Management of virtual machine snapshots

ABSTRACT

Methods and systems for managing, storing, and serving data within a virtualized environment are described. In some embodiments, a data management system may manage the extraction and storage of virtual machine snapshots, provide near instantaneous restoration of a virtual machine or one or more files located on the virtual machine, and enable secondary workloads to directly use the data management system as a primary storage target to read or modify past versions of data. The data management system may allow a virtual machine snapshot of a virtual machine stored within the system to be directly mounted to enable substantially instantaneous virtual machine recovery of the virtual machine.

CLAIM OF PRIORITY

The present application claims priority to U.S. Provisional ApplicationNo. 62/075,112, entitled “Data Management System,” filed Nov. 4, 2014,which is herein incorporated by reference in its entirety.

BACKGROUND

Virtualization allows virtual hardware to be created and decoupled fromthe underlying physical hardware. For example, a hypervisor running on ahost machine or server may be used to create one or more virtualmachines that may each run the same operating system or differentoperating systems (e.g., a first virtual machine may run a Windows®operating system and a second virtual machine may run a Unix-likeoperating system such as OS X®. A virtual machine may comprise asoftware implementation of a physical machine. The virtual machine mayinclude one or more virtual hardware devices, such as a virtualprocessor, a virtual memory, a virtual disk, or a virtual networkinterface card. The virtual machine may load and execute an operatingsystem and applications from the virtual memory. The operating systemand applications used by the virtual machine may be stored using thevirtual disk. The virtual machine may be stored as a set of filesincluding a virtual disk file for storing the contents of a virtual diskand a virtual machine configuration file for storing configurationsettings for the virtual machine. The configuration settings may includethe number of virtual processors (e.g., four virtual CPUs), the size ofa virtual memory, and the size of a virtual disk (e.g., a 10 GB virtualdisk) for the virtual machine.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A depicts one embodiment of a networked computing environment.

FIG. 1B depicts one embodiment of a server.

FIG. 1C depicts one embodiment of a storage appliance.

FIGS. 2A-2L depict various embodiments of sets of files and datastructures associated with managing and storing snapshots of virtualmachines.

FIG. 3A is a flowchart describing one embodiment of a process formanaging and storing virtual machine snapshots using a data storagesystem.

FIG. 3B is a flowchart describing one embodiment of a process forrestoring a version of a virtual machine using a data storage system.

FIG. 3C is a flowchart describing one embodiment of a process forgenerating a dependent snapshot of a virtual machine and generating oneor more new versions of the virtual machine that derive from thedependent snapshot using a data storage system.

FIGS. 4A-4B depict embodiments of stored files associated with differentversions of virtual machines.

FIGS. 4C-4D depict a flowchart describing one embodiment of a processfor managing and storing virtual machine snapshots using a data storagesystem.

FIG. 5A depicts one embodiment of a virtual machine search index.

FIG. 5B depicts one embodiment of a merged file for the version A45 ofVirtual Machine A referred to in FIG. 5A.

FIG. 5C depicts one embodiment of a first portion of a base image and asecond portion of the base image.

FIG. 5D is a flowchart describing one embodiment of a process forextracting a particular version of a file from one or more snapshots ofa virtual machine.

FIGS. 6A-6H depict various embodiments of sets of files and datastructures associated with managing and storing snapshots of virtualmachines.

FIG. 6I is a flowchart describing one embodiment of a process forstoring snapshots of a virtual machine.

FIG. 6J is a flowchart describing one embodiment of a process forgenerating a signature of a snapshot.

FIGS. 7A-7D depict various embodiments of sets of files and datastructures associated with managing and storing snapshots of virtualmachines.

FIG. 7E is a flowchart describing one embodiment of a process formanaging and storing snapshots of a virtual machine using a hybridlocal/remote data management system.

FIG. 8 is a flowchart describing one embodiment of a process forgenerating a cloned virtual machine environment.

FIG. 9 is a flowchart describing one embodiment of a process foroperating a cluster-based file server.

DETAILED DESCRIPTION

Technology is described for managing, storing, and serving data within avirtualized environment. In one embodiment, an integrated datamanagement and storage system may manage the extraction and storage ofhistorical snapshots associated with different point in time versions ofone or more virtual machines, provide near instantaneous restoration ofa virtual machine or one or more files located on the virtual machine,and enable secondary workloads (e.g., workloads for experimental oranalytics purposes) to directly use the integrated data management andstorage system as a primary storage target to read or modify pastversions of data. The integrated data management and storage system mayprovide a unified primary and secondary storage system with built-indata management that allows virtual machine snapshots of a virtualmachine stored within the system to be directly mounted or madeaccessible in order to enable substantially instantaneous virtualmachine recovery of the virtual machine. In some cases, the integrateddata management and storage system may be used as both a backup storagesystem and a “live” primary storage system for primary workloads.

As virtualization technologies are adopted into information technology(IT) infrastructures, there is a growing need for recovery mechanisms tosupport mission critical application deployment within a virtualizedinfrastructure. However, a virtualized infrastructure may present a newset of challenges to the traditional methods of data management due tothe higher workload consolidation and the need for instant, granularrecovery. An integrated data management and storage system may enablesubstantially instantaneous recovery of applications running on thevirtual infrastructure without requiring the applications to be restoredfirst to a primary storage platform. The integrated data management andstorage system may provide a unified primary and secondary storagesystem that allows virtual machine snapshots to be directly mounted andused by secondary workloads, thereby providing a non-passive datastorage for backups and supporting secondary workloads that requireaccess to production data stored on a primary storage platform usedwithin a production environment. The benefits of using an integrateddata management and storage system include the ability to reduce theamount of data storage required to backup virtual machines, the abilityto reduce the amount of data storage required to support secondaryworkloads, the ability to provide a non-passive storage target in whichbackup data may be directly accessed and modified, and the ability toquickly restore earlier versions of virtual machines and files.

FIG. 1A depicts one embodiment of a networked computing environment 100in which the disclosed technology may be practiced. As depicted, thenetworked computing environment 100 includes a data center 150, astorage appliance 140, and a computing device 154 in communication witheach other via one or more networks 180. The networked computingenvironment 100 may include a plurality of computing devicesinterconnected through one or more networks 180. The one or morenetworks 180 may allow computing devices and/or storage devices toconnect to and communicate with other computing devices and/or otherstorage devices. In some cases, the networked computing environment mayinclude other computing devices and/or other storage devices not shown.The other computing devices may include, for example, a mobile computingdevice, a non-mobile computing device, a server, a workstation, a laptopcomputer, a tablet computer, a desktop computer, or an informationprocessing system. The other storage devices may include, for example, astorage area network storage device, a networked-attached storagedevice, a hard disk drive, a solid-state drive, or a data storagesystem.

The data center 150 may include one or more servers, such as server 160,in communication with one or more storage devices, such as storagedevice 156. The one or more servers may also be in communication withone or more storage appliances, such as storage appliance 170. Theserver 160, storage device 156, and storage appliance 170 may be incommunication with each other via a networking fabric connecting serversand data storage units within the data center to each other. The storageappliance 170 may include a data management system for backing upvirtual machines and/or files within a virtualized infrastructure. Theserver 160 may be used to create and manage one or more virtual machinesassociated with a virtualized infrastructure. The one or more virtualmachines may run various applications, such as a database application ora web server. The storage device 156 may include one or more hardwarestorage devices for storing data, such as a hard disk drive (HDD), amagnetic tape drive, a solid-state drive (SSD), a storage area network(SAN) storage device, or a networked-attached storage (NAS) device. Insome cases, a data center, such as data center 150, may includethousands of servers and/or data storage devices in communication witheach other. The data storage devices may comprise a tiered data storageinfrastructure (or a portion of a tiered data storage infrastructure).The tiered data storage infrastructure may allow for the movement ofdata across different tiers of a data storage infrastructure betweenhigher-cost, higher-performance storage devices (e.g., solid-statedrives and hard disk drives) and relatively lower-cost,lower-performance storage devices (e.g., magnetic tape drives).

The one or more networks 180 may include a secure network such as anenterprise private network, an unsecure network such as a wireless opennetwork, a local area network (LAN), a wide area network (WAN), and theInternet. The one or more networks 180 may include a cellular network, amobile network, a wireless network, or a wired network. Each network ofthe one or more networks 180 may include hubs, bridges, routers,switches, and wired transmission media such as a direct-wiredconnection. The one or more networks 180 may include an extranet orother private network for securely sharing information or providingcontrolled access to applications or files.

A server, such as server 160, may allow a client to download informationor files (e.g., executable, text, application, audio, image, or videofiles) from the server or to perform a search query related toparticular information stored on the server. In some cases, a server mayact as an application server or a file server. In general, a server mayrefer to a hardware device that acts as the host in a client-serverrelationship or a software process that shares a resource with orperforms work for one or more clients.

One embodiment of server 160 includes a network interface 165, processor166, memory 167, disk 168, and virtualization manager 169 all incommunication with each other. Network interface 165 allows server 160to connect to one or more networks 180. Network interface 165 mayinclude a wireless network interface and/or a wired network interface.Processor 166 allows server 160 to execute computer readableinstructions stored in memory 167 in order to perform processesdescribed herein. Processor 166 may include one or more processingunits, such as one or more CPUs and/or one or more GPUs. Memory 167 maycomprise one or more types of memory (e.g., RAM, SRAM, DRAM, ROM,EEPROM, Flash, etc.). Disk 168 may include a hard disk drive and/or asolid-state drive. Memory 167 and disk 168 may comprise hardware storagedevices.

The virtualization manager 169 may manage a virtualized infrastructureand perform management operations associated with the virtualizedinfrastructure. The virtualization manager 169 may manage theprovisioning of virtual machines running within the virtualizedinfrastructure and provide an interface to computing devices interactingwith the virtualized infrastructure. In one example, the virtualizationmanager 169 may set a virtual machine into a frozen state in response toa snapshot request made via an application programming interface (API)by a storage appliance, such as storage appliance 170. Setting thevirtual machine into a frozen state may allow a point in time snapshotof the virtual machine to be stored or transferred. In one example,updates made to a virtual machine that has been set into a frozen statemay be written to a separate file (e.g., an update file) while thevirtual disk file associated with the state of the virtual disk at thepoint in time is frozen. The virtual disk file may be set into aread-only state to prevent modifications to the virtual disk file whilethe virtual machine is in the frozen state. The virtualization manager169 may then transfer data associated with the virtual machine (e.g., animage of the virtual machine or a portion of the image of the virtualmachine) to a storage appliance in response to a request made by thestorage appliance. After the data associated with the point in timesnapshot of the virtual machine has been transferred to the storageappliance, the virtual machine may be released from the frozen state(i.e., unfrozen) and the updates made to the virtual machine and storedin the separate file may be merged into the virtual disk file. Thevirtualization manager 169 may perform various virtual machine relatedtasks, such as cloning virtual machines, creating new virtual machines,monitoring the state of virtual machines, moving virtual machinesbetween physical hosts for load balancing purposes, and facilitatingbackups of virtual machines.

One embodiment of storage appliance 170 includes a network interface175, processor 176, memory 177, and disk 178 all in communication witheach other. Network interface 175 allows storage appliance 170 toconnect to one or more networks 180. Network interface 175 may include awireless network interface and/or a wired network interface. Processor176 allows storage appliance 170 to execute computer readableinstructions stored in memory 177 in order to perform processesdescribed herein. Processor 176 may include one or more processingunits, such as one or more CPUs and/or one or more GPUs. Memory 177 maycomprise one or more types of memory (e.g., RAM, SRAM, DRAM, ROM,EEPROM, NOR Flash, NAND Flash, etc.). Disk 178 may include a hard diskdrive and/or a solid-state drive. Memory 177 and disk 178 may comprisehardware storage devices.

In one embodiment, the storage appliance 170 may include four machines.Each of the four machines may include a multi-core CPU, 64 GB of RAM, a400 GB SSD, three 4 TB HDDs, and a network interface controller. In thiscase, the four machines may be in communication with the one or morenetworks 180 via the four network interface controllers. The fourmachines may comprise four nodes of a server cluster. The server clustermay comprise a set of physical machines that are connected together viaa network. The server cluster may be used for storing data associatedwith a plurality of virtual machines, such as backup data associatedwith different point in time versions of 1000 virtual machines.

The networked computing environment 100 may provide a cloud computingenvironment for one or more computing devices. Cloud computing may referto Internet-based computing, wherein shared resources, software, and/orinformation may be provided to one or more computing devices on-demandvia the Internet. The networked computing environment 100 may comprise acloud computing environment providing Software-as-a-Service (SaaS) orInfrastructure-as-a-Service (IaaS) services. SaaS may refer to asoftware distribution model in which applications are hosted by aservice provider and made available to end users over the Internet. Inone embodiment, the networked computing environment 100 may include avirtualized infrastructure that provides software, data processing,and/or data storage services to end users accessing the services via thenetworked computing environment. In one example, networked computingenvironment 100 may provide cloud-based work productivity or businessrelated applications to a computing device, such as computing device154. The storage appliance 140 may comprise a cloud-based datamanagement system for backing up virtual machines and/or files within avirtualized infrastructure, such as virtual machines running on server160 or files stored on server 160.

In some cases, networked computing environment 100 may provide remoteaccess to secure applications and files stored within data center 150from a remote computing device, such as computing device 154. The datacenter 150 may use an access control application to manage remote accessto protected resources, such as protected applications, databases, orfiles located within the data center. To facilitate remote access tosecure applications and files, a secure network connection may beestablished using a virtual private network (VPN). A VPN connection mayallow a remote computing device, such as computing device 154, tosecurely access data from a private network (e.g., from a company fileserver or mail server) using an unsecure public network or the Internet.The VPN connection may require client-side software (e.g., running onthe remote computing device) to establish and maintain the VPNconnection. The VPN client software may provide data encryption andencapsulation prior to the transmission of secure private networktraffic through the Internet.

In some embodiments, the storage appliance 170 may manage the extractionand storage of virtual machine snapshots associated with different pointin time versions of one or more virtual machines running within the datacenter 150. A snapshot of a virtual machine may correspond with a stateof the virtual machine at a particular point in time. In response to arestore command from the server 160, the storage appliance 170 mayrestore a point in time version of a virtual machine or restore point intime versions of one or more files located on the virtual machine andtransmit the restored data to the server 160. In response to a mountcommand from the server 160, the storage appliance 170 may allow a pointin time version of a virtual machine to be mounted and allow the server160 to read and/or modify data associated with the point in time versionof the virtual machine. To improve storage density, the storageappliance 170 may deduplicate and compress data associated withdifferent versions of a virtual machine and/or deduplicate and compressdata associated with different virtual machines. To improve systemperformance, the storage appliance 170 may first store virtual machinesnapshots received from a virtualized environment in a cache, such as aflash-based cache. The cache may also store popular data or frequentlyaccessed data (e.g., based on a history of virtual machine restorations,incremental files associated with commonly restored virtual machineversions) and current day incremental files or incremental filescorresponding with snapshots captured within the past 24 hours.

An incremental file may comprise a forward incremental file or a reverseincremental file. A forward incremental file may include a set of datarepresenting changes that have occurred since an earlier point in timesnapshot of a virtual machine. To generate a snapshot of the virtualmachine corresponding with a forward incremental file, the forwardincremental file may be combined with an earlier point in time snapshotof the virtual machine (e.g., the forward incremental file may becombined with the last full image of the virtual machine that wascaptured before the forward incremental was captured and any otherforward incremental files that were captured subsequent to the last fullimage and prior to the forward incremental file). A reverse incrementalfile may include a set of data representing changes from a later pointin time snapshot of a virtual machine. To generate a snapshot of thevirtual machine corresponding with a reverse incremental file, thereverse incremental file may be combined with a later point in timesnapshot of the virtual machine (e.g., the reverse incremental file maybe combined with the most recent snapshot of the virtual machine and anyother reverse incremental files that were captured prior to the mostrecent snapshot and subsequent to the reverse incremental file).

The storage appliance 170 may provide a user interface (e.g., aweb-based interface or a graphical user interface) that displays virtualmachine backup information such as identifications of the virtualmachines protected and the historical versions or time machine views foreach of the virtual machines protected. A time machine view of a virtualmachine may include snapshots of the virtual machine over a plurality ofpoints in time. Each snapshot may comprise the state of the virtualmachine at a particular point in time. Each snapshot may correspond witha different version of the virtual machine (e.g., Version 1 of a virtualmachine may correspond with the state of the virtual machine at a firstpoint in time and Version 2 of the virtual machine may correspond withthe state of the virtual machine at a second point in time subsequent tothe first point in time).

The user interface may enable an end user of the storage appliance 170(e.g., a system administrator or a virtualization administrator) toselect a particular version of a virtual machine to be restored ormounted. When a particular version of a virtual machine has beenmounted, the particular version may be accessed by a client (e.g., avirtual machine, a physical machine, or a computing device) as if theparticular version was local to the client. A mounted version of avirtual machine may correspond with a mount point directory (e.g.,/snapshots/VM5/Version23). In one example, the storage appliance 170 mayrun an NFS server and make the particular version (or a copy of theparticular version) of the virtual machine accessible for reading and/orwriting. The end user of the storage appliance 170 may then select theparticular version to be mounted and run an application (e.g., a dataanalytics application) using the mounted version of the virtual machine.In another example, the particular version may be mounted as an iSCSItarget.

FIG. 1B depicts one embodiment of server 160 in FIG. 1A. The server 160may comprise one server out of a plurality of servers that are networkedtogether within a data center. In one example, the plurality of serversmay be positioned within one or more server racks within the datacenter. As depicted, the server 160 includes hardware-level componentsand software-level components. The hardware-level components include oneor more processors 182, one or more memory 184, and one or more disks185. The software-level components include a hypervisor 186, avirtualized infrastructure manager 199, and one or more virtualmachines, such as virtual machine 198. The hypervisor 186 may comprise anative hypervisor or a hosted hypervisor. The hypervisor 186 may providea virtual operating platform for running one or more virtual machines,such as virtual machine 198. Virtual machine 198 includes a plurality ofvirtual hardware devices including a virtual processor 192, a virtualmemory 194, and a virtual disk 195. The virtual disk 195 may comprise afile stored within the one or more disks 185. In one example, a virtualmachine may include a plurality of virtual disks, with each virtual diskof the plurality of virtual disks associated with a different filestored on the one or more disks 185. Virtual machine 198 may include aguest operating system 196 that runs one or more applications, such asapplication 197.

The virtualized infrastructure manager 199, which may correspond withthe virtualization manager 169 in FIG. 1A, may run on a virtual machineor natively on the server 160. The virtualized infrastructure manager199 may provide a centralized platform for managing a virtualizedinfrastructure that includes a plurality of virtual machines. Thevirtualized infrastructure manager 199 may manage the provisioning ofvirtual machines running within the virtualized infrastructure andprovide an interface to computing devices interacting with thevirtualized infrastructure. The virtualized infrastructure manager 199may perform various virtualized infrastructure related tasks, such ascloning virtual machines, creating new virtual machines, monitoring thestate of virtual machines, and facilitating backups of virtual machines.

In one embodiment, the server 160 may use the virtualized infrastructuremanager 199 to facilitate backups for a plurality of virtual machines(e.g., eight different virtual machines) running on the server 160. Eachvirtual machine running on the server 160 may run its own guestoperating system and its own set of applications. Each virtual machinerunning on the server 160 may store its own set of files using one ormore virtual disks associated with the virtual machine (e.g., eachvirtual machine may include two virtual disks that are used for storingdata associated with the virtual machine).

In one embodiment, a data management application running on a storageappliance, such as storage appliance 140 in FIG. 1A or storage appliance170 in FIG. 1A, may request a snapshot of a virtual machine running onserver 160. The snapshot of the virtual machine may be stored as one ormore files, with each file associated with a virtual disk of the virtualmachine. A snapshot of a virtual machine may correspond with a state ofthe virtual machine at a particular point in time. The particular pointin time may be associated with a time stamp. In one example, a firstsnapshot of a virtual machine may correspond with a first state of thevirtual machine (including the state of applications and files stored onthe virtual machine) at a first point in time (e.g., 5:30 p.m. on Jun.29, 2014) and a second snapshot of the virtual machine may correspondwith a second state of the virtual machine at a second point in timesubsequent to the first point in time (e.g., 5:30 p.m. on Jun. 30,2014).

In response to a request for a snapshot of a virtual machine at aparticular point in time, the virtualized infrastructure manager 199 mayset the virtual machine into a frozen state or store a copy of thevirtual machine at the particular point in time. The virtualizedinfrastructure manager 199 may then transfer data associated with thevirtual machine (e.g., an image of the virtual machine or a portion ofthe image of the virtual machine) to the storage appliance. The dataassociated with the virtual machine may include a set of files includinga virtual disk file storing contents of a virtual disk of the virtualmachine at the particular point in time and a virtual machineconfiguration file storing configuration settings for the virtualmachine at the particular point in time. The contents of the virtualdisk file may include the operating system used by the virtual machine,local applications stored on the virtual disk, and user files (e.g.,images and word processing documents). In some cases, the virtualizedinfrastructure manager 199 may transfer a full image of the virtualmachine to the storage appliance or a plurality of data blockscorresponding with the full image (e.g., to enable a full image-levelbackup of the virtual machine to be stored on the storage appliance). Inother cases, the virtualized infrastructure manager 199 may transfer aportion of an image of the virtual machine associated with data that haschanged since an earlier point in time prior to the particular point intime or since a last snapshot of the virtual machine was taken. In oneexample, the virtualized infrastructure manager 199 may transfer onlydata associated with virtual blocks stored on a virtual disk of thevirtual machine that have changed since the last snapshot of the virtualmachine was taken. In one embodiment, the data management applicationmay specify a first point in time and a second point in time and thevirtualized infrastructure manager 199 may output one or more virtualdata blocks associated with the virtual machine that have been modifiedbetween the first point in time and the second point in time.

In some embodiments, the server 160 may or the hypervisor 186 maycommunicate with a storage appliance, such as storage appliance 140 inFIG. 1A or storage appliance 170 in FIG. 1A, using a distributed filesystem protocol such as Network File System (NFS) Version 3. Thedistributed file system protocol may allow the server 160 or thehypervisor 186 to access, read, write, or modify files stored on thestorage appliance as if the files were locally stored on the server. Thedistributed file system protocol may allow the server 160 or thehypervisor 186 to mount a directory or a portion of a file systemlocated within the storage appliance.

FIG. 1C depicts one embodiment of storage appliance 170 in FIG. 1A. Thestorage appliance may include a plurality of physical machines that maybe grouped together and presented as a single computing system. Eachphysical machine of the plurality of physical machines may comprise anode in a cluster (e.g., a failover cluster). In one example, thestorage appliance may be positioned within a server rack within a datacenter. As depicted, the storage appliance 170 includes hardware-levelcomponents and software-level components. The hardware-level componentsinclude one or more physical machines, such as physical machine 120 andphysical machine 130. The physical machine 120 includes a networkinterface 121, processor 122, memory 123, and disk 124 all incommunication with each other. Processor 122 allows physical machine 120to execute computer readable instructions stored in memory 123 toperform processes described herein. Disk 124 may include a hard diskdrive and/or a solid-state drive. The physical machine 130 includes anetwork interface 131, processor 132, memory 133, and disk 134 all incommunication with each other. Processor 132 allows physical machine 130to execute computer readable instructions stored in memory 133 toperform processes described herein. Disk 134 may include a hard diskdrive and/or a solid-state drive. In some cases, disk 134 may include aflash-based SSD or a hybrid HDD/SSD drive. In one embodiment, thestorage appliance 170 may include a plurality of physical machinesarranged in a cluster (e.g., eight machines in a cluster). Each of theplurality of physical machines may include a plurality of multi-coreCPUs, 128 GB of RAM, a 500 GB SSD, four 4 TB HDDs, and a networkinterface controller.

In some embodiments, the plurality of physical machines may be used toimplement a cluster-based network file server. The cluster-based networkfile server may neither require nor use a front-end load balancer. Oneissue with using a front-end load balancer to host the IP address forthe cluster-based network file server and to forward requests to thenodes of the cluster-based network file server is that the front-endload balancer comprises a single point of failure for the cluster-basednetwork file server. In some cases, the file system protocol used by aserver, such as server 160 in FIG. 1A, or a hypervisor, such ashypervisor 186 in FIG. 1B, to communicate with the storage appliance 170may not provide a failover mechanism (e.g., NFS Version 3). In the casethat no failover mechanism is provided on the client-side, thehypervisor may not be able to connect to a new node within a cluster inthe event that the node connected to the hypervisor fails.

In some embodiments, each node in a cluster may be connected to eachother via a network and may be associated with one or more IP addresses(e.g., two different IP addresses may be assigned to each node). In oneexample, each node in the cluster may be assigned a permanent IP addressand a floating IP address and may be accessed using either the permanentIP address or the floating IP address. In this case, a hypervisor, suchas hypervisor 186 in FIG. 1B may be configured with a first floating IPaddress associated with a first node in the cluster. The hypervisor mayconnect to the cluster using the first floating IP address. In oneexample, the hypervisor may communicate with the cluster using the NFSVersion 3 protocol. Each node in the cluster may run a Virtual RouterRedundancy Protocol (VRRP) daemon. A daemon may comprise a backgroundprocess. Each VRRP daemon may include a list of all floating IPaddresses available within the cluster. In the event that the first nodeassociated with the first floating IP address fails, one of the VRRPdaemons may automatically assume or pick up the first floating IPaddress if no other VRRP daemon has already assumed the first floatingIP address. Therefore, if the first node in the cluster fails orotherwise goes down, then one of the remaining VRRP daemons running onthe other nodes in the cluster may assume the first floating IP addressthat is used by the hypervisor for communicating with the cluster.

In order to determine which of the other nodes in the cluster willassume the first floating IP address, a VRRP priority may beestablished. In one example, given a number (N) of nodes in a clusterfrom node(0) to node(N−1), for a floating IP address (i), the VRRPpriority of node(j) may be (j−i) modulo N. In another example, given anumber (N) of nodes in a cluster from node(0) to node(N−1), for afloating IP address (i), the VRRP priority of node(j) may be (i−j)modulo N. In these cases, node(j) will assume floating IP address (i)only if its VRRP priority is higher than that of any other node in thecluster that is alive and announcing itself on the network. Thus, if anode fails, then there may be a clear priority ordering for determiningwhich other node in the cluster will take over the failed node'sfloating IP address.

In some cases, a cluster may include a plurality of nodes and each nodeof the plurality of nodes may be assigned a different floating IPaddress. In this case, a first hypervisor may be configured with a firstfloating IP address associated with a first node in the cluster, asecond hypervisor may be configured with a second floating IP addressassociated with a second node in the cluster, and a third hypervisor maybe configured with a third floating IP address associated with a thirdnode in the cluster.

As depicted in FIG. 1C, the software-level components of the storageappliance 170 may include data management system 102, a virtualizationinterface 104, a distributed job scheduler 108, a distributed metadatastore 110, a distributed file system 112, and one or more virtualmachine search indexes, such as virtual machine search index 106. In oneembodiment, the software-level components of the storage appliance 170may be run using a dedicated hardware-based appliance. In anotherembodiment, the software-level components of the storage appliance 170may be run from the cloud (e.g., the software-level components may beinstalled on a cloud service provider).

In some cases, the data storage across a plurality of nodes in a cluster(e.g., the data storage available from the one or more physicalmachines) may be aggregated and made available over a single file systemnamespace (e.g., /snapshots/). A directory for each virtual machineprotected using the storage appliance 170 may be created (e.g., thedirectory for Virtual Machine A may be /snapshots/VM_A). Snapshots andother data associated with a virtual machine may reside within thedirectory for the virtual machine. In one example, snapshots of avirtual machine may be stored in subdirectories of the directory (e.g.,a first snapshot of Virtual Machine A may reside in /snapshots/VM_A/s1/and a second snapshot of Virtual Machine A may reside in/snapshots/VM_A/s2/).

The distributed file system 112 may present itself as a single filesystem, in which as new physical machines or nodes are added to thestorage appliance 170, the cluster may automatically discover theadditional nodes and automatically increase the available capacity ofthe file system for storing files and other data. Each file stored inthe distributed file system 112 may be partitioned into one or morechunks. Each of the one or more chunks may be stored within thedistributed file system 112 as a separate file. The files stored withinthe distributed file system 112 may be replicated or mirrored over aplurality of physical machines, thereby creating a load-balanced andfault tolerant distributed file system. In one example, storageappliance 170 may include ten physical machines arranged as a failovercluster and a first file corresponding with a snapshot of a virtualmachine (e.g., /snapshots/VM_A/s1/s1.full) may be replicated and storedon three of the ten machines.

The distributed metadata store 110 may include a distributed databasemanagement system that provides high availability without a single pointof failure. In one embodiment, the distributed metadata store 110 maycomprise a database, such as a distributed document oriented database.The distributed metadata store 110 may be used as a distributed keyvalue storage system. In one example, the distributed metadata store 110may comprise a distributed NoSQL key value store database. In somecases, the distributed metadata store 110 may include a partitioned rowstore, in which rows are organized into tables or other collections ofrelated data held within a structured format within the key value storedatabase. A table (or a set of tables) may be used to store metadatainformation associated with one or more files stored within thedistributed file system 112. The metadata information may include thename of a file, a size of the file, file permissions associated with thefile, when the file was last modified, and file mapping informationassociated with an identification of the location of the file storedwithin a cluster of physical machines. In one embodiment, a new filecorresponding with a snapshot of a virtual machine may be stored withinthe distributed file system 112 and metadata associated with the newfile may be stored within the distributed metadata store 110. Thedistributed metadata store 110 may also be used to store a backupschedule for the virtual machine and a list of snapshots for the virtualmachine that are stored using the storage appliance 170.

In some cases, the distributed metadata store 110 may be used to manageone or more versions of a virtual machine. Each version of the virtualmachine may correspond with a full image snapshot of the virtual machinestored within the distributed file system 112 or an incremental snapshotof the virtual machine (e.g., a forward incremental or reverseincremental) stored within the distributed file system 112. In oneembodiment, the one or more versions of the virtual machine maycorrespond with a plurality of files. The plurality of files may includea single full image snapshot of the virtual machine and one or moreincrementals derived from the single full image snapshot. The singlefull image snapshot of the virtual machine may be stored using a firststorage device of a first type (e.g., a HDD) and the one or moreincrementals derived from the single full image snapshot may be storedusing a second storage device of a second type (e.g., an SSD). In thiscase, only a single full image needs to be stored and each version ofthe virtual machine may be generated from the single full image or thesingle full image combined with a subset of the one or moreincrementals. Furthermore, each version of the virtual machine may begenerated by performing a sequential read from the first storage device(e.g., reading a single file from a HDD) to acquire the full image and,in parallel, performing one or more reads from the second storage device(e.g., performing fast random reads from an SSD) to acquire the one ormore incrementals.

The distributed job scheduler 108 may be used for scheduling backup jobsthat acquire and store virtual machine snapshots for one or more virtualmachines over time. The distributed job scheduler 108 may follow abackup schedule to backup an entire image of a virtual machine at aparticular point in time or one or more virtual disks associated withthe virtual machine at the particular point in time. In one example, thebackup schedule may specify that the virtual machine be backed up at asnapshot capture frequency, such as every two hours or every 24 hours.Each backup job may be associated with one or more tasks to be performedin a sequence. Each of the one or more tasks associated with a job maybe run on a particular node within a cluster. In some cases, thedistributed job scheduler 108 may schedule a specific job to be run on aparticular node based on data stored on the particular node. Forexample, the distributed job scheduler 108 may schedule a virtualmachine snapshot job to be run on a node in a cluster that is used tostore snapshots of the virtual machine in order to reduce networkcongestion.

The distributed job scheduler 108 may comprise a distributed faulttolerant job scheduler, in which jobs affected by node failures arerecovered and rescheduled to be run on available nodes. In oneembodiment, the distributed job scheduler 108 may be fully decentralizedand implemented without the existence of a master node. The distributedjob scheduler 108 may run job scheduling processes on each node in acluster or on a plurality of nodes in the cluster. In one example, thedistributed job scheduler 108 may run a first set of job schedulingprocesses on a first node in the cluster, a second set of job schedulingprocesses on a second node in the cluster, and a third set of jobscheduling processes on a third node in the cluster. The first set ofjob scheduling processes, the second set of job scheduling processes,and the third set of job scheduling processes may store informationregarding jobs, schedules, and the states of jobs using a metadatastore, such as distributed metadata store 110. In the event that thefirst node running the first set of job scheduling processes fails(e.g., due to a network failure or a physical machine failure), thestates of the jobs managed by the first set of job scheduling processesmay fail to be updated within a threshold period of time (e.g., a jobmay fail to be completed within 30 seconds or within 3 minutes frombeing started). In response to detecting jobs that have failed to beupdated within the threshold period of time, the distributed jobscheduler 108 may undo and restart the failed jobs on available nodeswithin the cluster.

The job scheduling processes running on at least a plurality of nodes ina cluster (e.g., on each available node in the cluster) may manage thescheduling and execution of a plurality of jobs. The job schedulingprocesses may include run processes for running jobs, cleanup processesfor cleaning up failed tasks, and rollback processes for rolling-back orundoing any actions or tasks performed by failed jobs. In oneembodiment, the job scheduling processes may detect that a particulartask for a particular job has failed and in response may perform acleanup process to clean up or remove the effects of the particular taskand then perform a rollback process that processes one or more completedtasks for the particular job in reverse order to undo the effects of theone or more completed tasks. Once the particular job with the failedtask has been undone, the job scheduling processes may restart theparticular job on an available node in the cluster.

The distributed job scheduler 108 may manage a job in which a series oftasks associated with the job are to be performed atomically (i.e.,partial execution of the series of tasks is not permitted). If theseries of tasks cannot be completely executed or there is any failurethat occurs to one of the series of tasks during execution (e.g., a harddisk associated with a physical machine fails or a network connection tothe physical machine fails), then the state of a data management systemmay be returned to a state as if none of the series of tasks were everperformed. The series of tasks may correspond with an ordering of tasksfor the series of tasks and the distributed job scheduler 108 may ensurethat each task of the series of tasks is executed based on the orderingof tasks. Tasks that do not have dependencies with each other may beexecuted in parallel.

In some cases, the distributed job scheduler 108 may schedule each taskof a series of tasks to be performed on a specific node in a cluster. Inother cases, the distributed job scheduler 108 may schedule a first taskof the series of tasks to be performed on a first node in a cluster anda second task of the series of tasks to be performed on a second node inthe cluster. In these cases, the first task may have to operate on afirst set of data (e.g., a first file stored in a file system) stored onthe first node and the second task may have to operate on a second setof data (e.g., metadata related to the first file that is stored in adatabase) stored on the second node. In some embodiments, one or moretasks associated with a job may have an affinity to a specific node in acluster. In one example, if the one or more tasks require access to adatabase that has been replicated on three nodes in a cluster, then theone or more tasks may be executed on one of the three nodes. In anotherexample, if the one or more tasks require access to multiple chunks ofdata associated with a virtual disk that has been replicated over fournodes in a cluster, then the one or more tasks may be executed on one ofthe four nodes. Thus, the distributed job scheduler 108 may assign oneor more tasks associated with a job to be executed on a particular nodein a cluster based on the location of data required to be accessed bythe one or more tasks.

In one embodiment, the distributed job scheduler 108 may manage a firstjob associated with capturing and storing a snapshot of a virtualmachine periodically (e.g., every 30 minutes). The first job may includeone or more tasks, such as communicating with a virtualizedinfrastructure manager, such as the virtualized infrastructure manager199 in FIG. 1B, to create a frozen copy of the virtual machine and totransfer one or more chunks (or one or more files) associated with thefrozen copy to a storage appliance, such as storage appliance 170 inFIG. 1A. The one or more tasks may also include generating metadata forthe one or more chunks, storing the metadata using the distributedmetadata store 110, storing the one or more chunks within thedistributed file system 112, and communicating with the virtualizedinfrastructure manager that the virtual machine the frozen copy of thevirtual machine may be unfrozen or released for a frozen state. Themetadata for a first chunk of the one or more chunks may includeinformation specifying a version of the virtual machine associated withthe frozen copy, a time associated with the version (e.g., the snapshotof the virtual machine was taken at 5:30 p.m. on Jun. 29, 2014), and afile path to where the first chunk is stored within the distributed filesystem 112 (e.g., the first chunk is located at/snapshots/VM_B/s1/s1.chunk1). The one or more tasks may also includededuplication, compression (e.g., using a lossless data compressionalgorithm such as LZ4 or LZ77), decompression, encryption (e.g., using asymmetric key algorithm such as Triple DES or AES-256), and decryptionrelated tasks.

The virtualization interface 104 may provide an interface forcommunicating with a virtualized infrastructure manager managing avirtualization infrastructure, such as virtualized infrastructuremanager 199 in FIG. 1B, and requesting data associated with virtualmachine snapshots from the virtualization infrastructure. Thevirtualization interface 104 may communicate with the virtualizedinfrastructure manager using an API for accessing the virtualizedinfrastructure manager (e.g., to communicate a request for a snapshot ofa virtual machine). In this case, storage appliance 170 may request andreceive data from a virtualized infrastructure without requiring agentsoftware to be installed or running on virtual machines within thevirtualized infrastructure. The virtualization interface 104 may requestdata associated with virtual blocks stored on a virtual disk of thevirtual machine that have changed since a last snapshot of the virtualmachine was taken or since a specified prior point in time. Therefore,in some cases, if a snapshot of a virtual machine is the first snapshottaken of the virtual machine, then a full image of the virtual machinemay be transferred to the storage appliance. However, if the snapshot ofthe virtual machine is not the first snapshot taken of the virtualmachine, then only the data blocks of the virtual machine that havechanged since a prior snapshot was taken may be transferred to thestorage appliance.

The virtual machine search index 106 may include a list of files thathave been stored using a virtual machine and a version history for eachof the files in the list. Each version of a file may be mapped to theearliest point in time snapshot of the virtual machine that includes theversion of the file or to a snapshot of the virtual machine that includethe version of the file (e.g., the latest point in time snapshot of thevirtual machine that includes the version of the file). In one example,the virtual machine search index 106 may be used to identify a versionof the virtual machine that includes a particular version of a file(e.g., a particular version of a database, a spreadsheet, or a wordprocessing document). In some cases, each of the virtual machines thatare backed up or protected using storage appliance 170 may have acorresponding virtual machine search index.

In one embodiment, as each snapshot of a virtual machine is ingestedeach virtual disk associated with the virtual machine is parsed in orderto identify a file system type associated with the virtual disk and toextract metadata (e.g., file system metadata) for each file stored onthe virtual disk. The metadata may include information for locating andretrieving each file from the virtual disk. The metadata may alsoinclude a name of a file, the size of the file, the last time at whichthe file was modified, and a content checksum for the file. Each filethat has been added, deleted, or modified since a previous snapshot wascaptured may be determined using the metadata (e.g., by comparing thetime at which a file was last modified with a time associated with theprevious snapshot). Thus, for every file that has existed within any ofthe snapshots of the virtual machine, a virtual machine search index maybe used to identify when the file was first created (e.g., correspondingwith a first version of the file) and at what times the file wasmodified (e.g., corresponding with subsequent versions of the file).Each version of the file may be mapped to a particular version of thevirtual machine that stores that version of the file.

In some cases, if a virtual machine includes a plurality of virtualdisks, then a virtual machine search index may be generated for eachvirtual disk of the plurality of virtual disks. For example, a firstvirtual machine search index may catalog and map files located on afirst virtual disk of the plurality of virtual disks and a secondvirtual machine search index may catalog and map files located on asecond virtual disk of the plurality of virtual disks. In this case, aglobal file catalog or a global virtual machine search index for thevirtual machine may include the first virtual machine search index andthe second virtual machine search index. A global file catalog may bestored for each virtual machine backed up by a storage appliance withina file system, such as distributed file system 112 in FIG. 1C.

The data management system 102 may comprise an application running onthe storage appliance that manages and stores one or more snapshots of avirtual machine. In one example, the data management system 102 maycomprise a highest level layer in an integrated software stack runningon the storage appliance. The integrated software stack may include thedata management system 102, the virtualization interface 104, thedistributed job scheduler 108, the distributed metadata store 110, andthe distributed file system 112. In some cases, the integrated softwarestack may run on other computing devices, such as a server or computingdevice 154 in FIG. 1A. The data management system 102 may use thevirtualization interface 104, the distributed job scheduler 108, thedistributed metadata store 110, and the distributed file system 112 tomanage and store one or more snapshots of a virtual machine. Eachsnapshot of the virtual machine may correspond with a point in timeversion of the virtual machine. The data management system 102 maygenerate and manage a list of versions for the virtual machine. Eachversion of the virtual machine may map to or reference one or morechunks and/or one or more files stored within the distributed filesystem 112. Combined together, the one or more chunks and/or the one ormore files stored within the distributed file system 112 may comprise afull image of the version of the virtual machine.

In some cases, the storage appliance 170 may comprise a convergedscale-out data management system that includes an integrated softwarestack that protects application data, enables near instant recovery ofapplications, and allows derivative workloads (e.g., testing,development, and analytic workloads) to use the storage appliance as aprimary storage platform to read and/or modify past versions of data. Inone embodiment, the data management system 102 may manage and store aplurality of point in time versions of a virtual machine, receive aninstruction to restore a first version of the plurality of point in timeversions of the virtual machine (e.g., to restore the virtual machine toa restore point), generate the first version in response to theinstruction to restore the first version, and output the first version(e.g., transfer the first version to a primary storage system). Thefirst version may correspond with the most recent snapshot of thevirtual machine. The data management system 102 may also receive asecond instruction to restore a particular version of a particular file(e.g., a word processing document or a database file), determine asecond version of the plurality of point in time versions of the virtualmachine that includes the particular version of the particular file,extract the particular version of the particular file from a portion ofthe second version of the virtual machine (e.g., extracting theparticular version of the particular file without completely generatingthe full image of the second version of the virtual machine), and outputthe particular version of the particular file (e.g., by transferring theparticular version of the particular file to a server). In some cases, agroup of one or more files (e.g., associated with a file folder) may berestored and outputted from the storage appliance 170 without requiringa full image of a virtual machine to be generated or restored.

In another embodiment, the data management system 102 may manage andstore a plurality of point in time versions of a virtual machine,receive an instruction to mount a particular version of the plurality ofpoint in time versions, generate a mounted version of the virtualmachine based on the particular version in response to the instructionto mount the particular version, output a first set of data associatedwith the mounted version, receive a second set of data associated withone or more modifications to the mounted version, and update the mountedversion of the virtual machine based on the second set of data. Inparallel, while a primary system has mounted the particular version ofthe virtual machine and has the ability to access and/or modify dataassociated with the particular version of the virtual machine, a copy ofthe particular version of the virtual machine (e.g., the contents of avirtual disk and configuration information associated with theparticular version) and any subsequent changes to the particular versionof the virtual machine may be transferred to the primary system. In somecases, a primary system may automatically failover or switch to theparticular version stored on the storage appliance 170 and thenautomatically failback or switch back to the primary system once theparticular version of the virtual machine has been transferred to theprimary system. By allowing a primary system to directly mount theparticular version of the virtual machine, the primary system mayimmediately bring up and use the particular version of the virtualmachine without first restoring and transferring the particular versionof the virtual machine to the primary system. In some cases, to improvesystem performance and to enable a non-passive storage system, the datamanagement system 102 may generate and then store the mounted version ofthe virtual machine in a cache, such as a flash-based cache.

In another embodiment, the data management system 102 may manage andstore a plurality of point in time versions of a virtual machine,receive an instruction to generate a derivative version of a firstversion of the plurality of point in time versions, generate thederivative version in response to the instruction, receive a second setof data associated with one or more modifications to the derivativeversion, and update the derivative version of the virtual machine basedon the second set of data. By allowing a system running a derivativeworkload to directly mount a derivative version of a point in timeversion of the virtual machine and read and/or modify data associatedwith the derivative version, the derivative workload may be run using abackup storage system for a primary system, thereby enabling anon-passive backup system for the primary system. In one example, a newapplication may be installed on a derivative version of a snapshot of avirtual machine and run using the derivative version in order to testthe execution of the new application prior to installing the newapplication within a production environment.

In some embodiments, a plurality of versions of a virtual machine may bestored as a base file associated with a complete image of the virtualmachine at a particular point in time and one or more incremental filesassociated with forward and/or reverse incremental changes derived fromthe base file. The data management system 102 may patch together thebase file and the one or more incremental files in order to generate aparticular version of the plurality of versions by adding and/orsubtracting data associated with the one or more incremental files fromthe base file or intermediary files derived from the base file. In someembodiments, each version of the plurality of versions of a virtualmachine may correspond with a merged file. A merged file may includepointers or references to one or more files and/or one or more chunksassociated with a particular version of a virtual machine. In oneexample, a merged file may include a first pointer or symbolic link to abase file and a second pointer or symbolic link to an incremental fileassociated with the particular version of the virtual machine. In someembodiments, the one or more incremental files may correspond withforward incrementals (e.g., positive deltas), reverse incrementals(e.g., negative deltas), or a combination of both forward incrementalsand reverse incrementals.

FIGS. 2A-2L depict various embodiments of sets of files and datastructures (e.g., implemented using merged files) associated withmanaging and storing snapshots of virtual machines. FIGS. 2A-2L may bereferred to when describing the processes depicted in FIGS. 3A-3C.

FIG. 2A depicts one embodiment of a set of virtual machine snapshotsstored as a first set of files. The first set of files may be storedusing a distributed file system, such as distributed file system 112 inFIG. 1C. As depicted, the first set of files includes a set of reverseincrementals (R1-R4), a full image (Base), and a set of forwardincrementals (F1-F2). The set of virtual machine snapshots includesdifferent versions of a virtual machine (versions V1-V7 of VirtualMachine A) captured at different points in time (times T1-T7). In somecases, the file size of the reverse incremental R3 and the file size ofthe forward incremental F2 may both be less than the file size of thebase image corresponding with version V5 of Virtual Machine A. The baseimage corresponding with version V5 of Virtual Machine A may comprise afull image of Virtual Machine A at point in time T5. The base image mayinclude a virtual disk file for Virtual Machine A at point in time T5.The reverse incremental R3 corresponds with version V2 of VirtualMachine A and the forward incremental F2 corresponds with version V7 ofVirtual Machine A.

In some embodiments, each snapshot of the set of virtual machinesnapshots may be stored within a storage appliance, such as storageappliance 170 in FIG. 1A. In other embodiments, a first set of the setof virtual machine snapshots may be stored within a first storageappliance and a second set of the set of virtual machine snapshots maybe stored within a second storage appliance, such as storage appliance140 in FIG. 1A. In this case, a data management system may extend acrossboth the first storage appliance and the second storage appliance. Inone example, the first set of the set of virtual machine snapshots maybe stored within a local cluster repository (e.g., recent snapshots ofthe file may be located within a first data center) and the second setof the set of virtual machine snapshots may be stored within a remotecluster repository (e.g., older snapshots or archived snapshots of thefile may be located within a second data center) or a cloud repository.

FIG. 2B depicts one embodiment of a merged file for generating versionV7 of Virtual Machine A using the first set of files depicted in FIG.2A. The merged file includes a first pointer (pBase) that references thebase image Base (e.g., via the path /snapshots/VM_A/s5/s5.full), asecond pointer (pF1) that references the forward incremental F1 (e.g.,via the path /snapshots/VM_A/s6/s6.delta), and a third pointer (pF2)that references the forward incremental F2 (e.g., via the path/snapshots/VM_A/s7/s7.delta). In one embodiment, to generate the fullimage of version V7 of Virtual Machine A, the base image may beacquired, the data changes associated with forward incremental F1 may beapplied to (or patched to) the base image to generate an intermediateimage, and then the data changes associated with forward incremental F2may be applied to the intermediate image to generate the full image ofversion V7 of Virtual Machine A.

FIG. 2C depicts one embodiment of a merged file for generating versionV2 of Virtual Machine A using the first set of files depicted in FIG.2A. The merged file includes a first pointer (pBase) that references thebase image Base (e.g., via the path /snapshots/VM_A/s5/s5.full), asecond pointer (pR1) that references the reverse incremental R1 (e.g.,via the path /snapshots/VM_A/s4/s4.delta), a third pointer (pR2) thatreferences the reverse incremental R2 (e.g., via the path/snapshots/VM_A/s3/s3.delta), and a fourth pointer (pR3) that referencesthe reverse incremental R3 (e.g., via the path/snapshots/VM_A/s2/s2.delta). In one embodiment, to generate the fullimage of version V2 of Virtual Machine A, the base image may beacquired, the data changes associated with reverse incremental R1 may beapplied to the base image to generate a first intermediate image, thedata changes associated with reverse incremental R2 may be applied tothe first intermediate image to generate a second intermediate image,and then the data changes associated with reverse incremental R3 may beapplied to the second intermediate image to generate the full image ofversion V2 of Virtual Machine A.

FIG. 2D depicts one embodiment of a set of virtual machine snapshotsstored as a second set of files after a consolidation process has beenperformed using the first set of files in FIG. 2A. The second set offiles may be stored using a distributed file system, such as distributedfile system 112 in FIG. 1C. The consolidation process may generate newfiles R12, R11, and Base2 associated with versions V5-V7 of VirtualMachine A in order to move a full image closer to a more recent versionof Virtual Machine A and to improve the reconstruction time for the morerecent versions of Virtual Machine A. The data associated with the fullimage Base in FIG. 2A may be equivalent to the new file R12 patched overR11 and the full image Base2. Similarly, the data associated with thefull image Base2 may be equivalent to the forward incremental F2 in FIG.2A patched over F1 and the full image Base in FIG. 2A.

In some cases, the consolidation process may be part of a periodicconsolidation process that is applied at a consolidation frequency(e.g., every 24 hours) to each virtual machine of a plurality ofprotected virtual machines to reduce the number of forward incrementalfiles that need to be patched to a base image in order to restore themost recent version of a virtual machine. Periodically reducing thenumber of forward incremental files may reduce the time to restore themost recent version of the virtual machine as the number of forwardincremental files that need to be applied to a base image to generatethe most recent version may be limited. In one example, if aconsolidation process is applied to snapshots of a virtual machine every24 hours and snapshots of the virtual machine are acquired every fourhours, then the number of forward incremental files may be limited to atmost five forward incremental files.

As depicted, the second set of files includes a set of reverseincrementals (R11-R12 and R1-R4) and a full image (Base2). The set ofvirtual machine snapshots includes the different versions of the virtualmachine (versions V1-V7 of Virtual Machine A) captured at the differentpoints in time (times T1-T7) depicted in FIG. 2A. In some cases, thefile size of the reverse incremental R2 may be substantially less thanthe file size of the base image Base2. The reverse incremental R2corresponds with version V2 of Virtual Machine A and the base imageBase2 corresponds with version V7 of Virtual Machine A. In this case,the most recent version of Virtual Machine A (i.e., the most recentrestore point for Virtual Machine A) comprises a full image. To generateearlier versions of Virtual Machine A, reverse incrementals may beapplied to (or patched to) the full image Base2. Subsequent versions ofVirtual Machine A may be stored as forward incrementals that depend fromthe full image Base2.

In one embodiment, a consolidation process may be applied to a first setof files associated with a virtual machine in order to generate a secondset of files to replace the first set of files. The first set of filesmay include a first base image from which a first version of the virtualmachine may be derived and a first forward incremental file from which asecond version of the virtual machine may be derived. The second set offiles may include a second reverse incremental file from which the firstversion of the virtual machine may be derived and a second base imagefrom which the second version of the virtual machine may be derived.During the consolidation process, data integrity checking may beperformed to detect and correct data errors in the files stored in afile system, such as distributed file system 112 in FIG. 1C, that areread to generate the second set of files.

FIG. 2E depicts one embodiment of a merged file for generating versionV7 of Virtual Machine A using the second set of files depicted in FIG.2D. The merged file includes a first pointer (pBase2) that referencesthe base image Base2 (e.g., via the path /snapshots/VM_A/s7/s7.full). Inthis case, the full image of version V7 of Virtual Machine A may bedirectly acquired without patching forward incrementals or reverseincrementals to the base image Base2 corresponding with version V7 ofVirtual Machine A.

FIG. 2F depicts one embodiment of a merged file for generating versionV2 of Virtual Machine A using the second set of files depicted in FIG.2D. The merged file includes a first pointer (pBase2) that referencesthe base image Base2 (e.g., via the path /snapshots/VM_A/s7/s7.full), asecond pointer (pR11) that references the reverse incremental R11 (e.g.,via the path /snapshots/VM_A/s6/s6.delta), a third pointer (pR12) thatreferences the reverse incremental R12 (e.g., via the path/snapshots/VM_A/s5/s5.delta), a fourth pointer (pR1) that references thereverse incremental R1 (e.g., via the path /snapshots/VM_A/s4/s4.delta),a fifth pointer (pR2) that references the reverse incremental R2 (e.g.,via the path /snapshots/VM_A/s3/s3.delta), and a sixth pointer (pR3)that references the reverse incremental R3 (e.g., via the path/snapshots/VM_A/s2/s2.delta). In one embodiment, to generate the fullimage of version V2 of Virtual Machine A, the base image may beacquired, the data changes associated with reverse incremental R11 maybe applied to the base image to generate a first intermediate image, thedata changes associated with reverse incremental R12 may be applied tothe first intermediate image to generate a second intermediate image,the data changes associated with reverse incremental R1 may be appliedto the second intermediate image to generate a third intermediate image,the data changes associated with reverse incremental R2 may be appliedto the third intermediate image to generate a fourth intermediate image,and then the data changes associated with reverse incremental R3 may beapplied to the fourth intermediate image to generate the full image ofversion V2 of Virtual Machine A.

FIG. 2G depicts one embodiment of a set of files associated withmultiple virtual machine snapshots. The set of files may be stored usinga distributed file system, such as distributed file system 112 in FIG.1C. As depicted, the set of files includes a set of reverse incrementals(R1-R3), a full image (Base), and a set of forward incrementals (F1-F2,F3, and F5-F6). In this case, a first version of Virtual Machine B maybe generated using a forward incremental F3 that derives from Version VXof Virtual Machine A and a second version of Virtual Machine C may begenerated using forward incrementals F5-F6 that are derived from VersionVZ of Virtual Machine A. In one example, Virtual Machine B may have beeninitially cloned from Version VX of Virtual Machine A and VirtualMachine C may have been initially cloned from Version VZ of VirtualMachine A.

In one embodiment, in response to a failure of a first virtual machinein a production environment (e.g., due to a failure of a physicalmachine running the first virtual machine), a most recent snapshot ofthe first virtual machine stored within a storage appliance, such asstorage appliance 170 in FIG. 1C, may be mounted and made available tothe production environment. In some cases, the storage appliance mayallow the most recent snapshot of the first virtual machine to bemounted by a computing device within the production environment, such asserver 160 in FIG. 1A. Once the most recent snapshot of the firstvirtual machine has been mounted, data stored within the most recentsnapshot of the first virtual machine may be read and/or modified andnew data may be written without the most recent snapshot of the firstvirtual machine being fully restored and transferred to the productionenvironment.

In another embodiment, a secondary workload may request that aparticular version of a virtual machine be mounted. In response to therequest, a storage appliance, such as storage appliance 170 in FIG. 1C,may clone the particular version of the virtual machine to generate anew virtual machine and then make the new virtual machine available tothe secondary workload. Once the new virtual machine has been mounted,data stored within the new virtual machine may be read and/or modifiedand new data may be written to the new virtual machine without changingdata associated with the particular version of the virtual machinestored within the storage appliance.

FIG. 2H depicts one embodiment of a merged file for generating versionV1 of Virtual Machine B using the set of files depicted in FIG. 2G. Themerged file includes a first pointer (pBase) that references the baseimage Base, a second pointer (pR1) that references the reverseincremental R1, a third pointer (pR2) that references the reverseincremental R2, and a fourth pointer (pF3) that references the forwardincremental F3. In one embodiment, to generate the full image of versionV1 of Virtual Machine B, the base image associated with Version VY ofVirtual Machine A may be acquired, the data changes associated withreverse incremental R1 may be applied to the base image to generate afirst intermediate image, the data changes associated with reverseincremental R2 may be applied to the first intermediate image togenerate a second intermediate image, and the data changes associatedwith forward incremental F3 may be applied to the second intermediateimage to generate the full image of version V1 of Virtual Machine B.

FIG. 2I depicts one embodiment of a merged file for generating versionV2 of Virtual Machine C using the set of files depicted in FIG. 2G. Themerged file includes a first pointer (pBase) that references the baseimage Base, a second pointer (pF1) that references the forwardincremental F1, a third pointer (pF5) that references the forwardincremental F5, and a fourth pointer (pF6) that references the forwardincremental F6. In one embodiment, to generate the full image of versionV2 of Virtual Machine C, a base image (e.g., the base image associatedwith Version VY of Virtual Machine A) may be acquired, the data changesassociated with forward incremental F1 may be applied to the base imageto generate a first intermediate image, the data changes associated withforward incremental F5 may be applied to the first intermediate image togenerate a second intermediate image, and the data changes associatedwith forward incremental F6 may be applied to the second intermediateimage to generate the full image of version V2 of Virtual Machine C.

FIG. 2J depicts one embodiment of a set of files associated withmultiple virtual machine snapshots after a consolidation process hasbeen performed using the set of files in FIG. 2G. The set of files maybe stored using a distributed file system, such as distributed filesystem 112 in FIG. 1C. The consolidation process may generate new filesR12, R11, and Base2. As depicted, the set of files includes a set ofreverse incrementals (R11-R12 and R1-R3), a full image (Base2), and aset of forward incrementals (F3 and F5-F7). In this case, a firstversion of Virtual Machine B may be generated using a forwardincremental F3 that derives from Version VX of Virtual Machine A and asecond version of Virtual Machine C may be generated using forwardincrementals F5-F6 that are derived from Version VZ of Virtual MachineA. In one example, Virtual Machine B may have been initially cloned fromVersion VX of Virtual Machine A and Virtual Machine C may have beeninitially cloned from version VZ of Virtual Machine A. Forwardincremental file F7 may include changes to Version VW of Virtual MachineA that occurred subsequent to the generation of the full image fileBase2. In some cases, the forward incremental file F7 may comprise awriteable file or have file permissions allowing modification of thefile, while all other files associated with earlier versions of VirtualMachine A comprise read only files.

FIG. 2K depicts one embodiment of a merged file for generating versionV1 of Virtual Machine B using the set of files depicted in FIG. 2J. Themerged file includes a first pointer (pBase2) that references the baseimage Base2, a second pointer (pR11) that references the reverseincremental R11, a third pointer (pR12) that references the reverseincremental R12, a fourth pointer (pR1) that references the reverseincremental R1, a fifth pointer (pR2) that references the reverseincremental R2, and a sixth pointer (pF3) that references the forwardincremental F3. In one embodiment, to generate the full image of versionV1 of Virtual Machine B, a base image (e.g., the base image associatedwith Version VW of Virtual Machine A) may be acquired, the data changesassociated with reverse incremental R11 may be applied to the base imageto generate a first intermediate image, the data changes associated withreverse incremental R12 may be applied to the first intermediate imageto generate a second intermediate image, the data changes associatedwith reverse incremental R1 may be applied to the second intermediateimage to generate a third intermediate image, the data changesassociated with reverse incremental R2 may be applied to the thirdintermediate image to generate a fourth intermediate image, and the datachanges associated with forward incremental F3 may be applied to thefourth intermediate image to generate the full image of version V1 ofVirtual Machine B.

FIG. 2L depicts one embodiment of a merged file for generating versionV2 of Virtual Machine C using the set of files depicted in FIG. 2J. Themerged file includes a first pointer (pBase2) that references the baseimage Base2, a second pointer (pR11) that references the reverseincremental R11, a third pointer (pF5) that references the forwardincremental F5, and a fourth pointer (pF6) that references the forwardincremental F6. In one embodiment, to generate the full image of versionV2 of Virtual Machine C, a base image (e.g., the base image associatedwith Version VW of Virtual Machine A) may be acquired, the data changesassociated with reverse incremental R11 may be applied to the base imageto generate a first intermediate image, the data changes associated withforward incremental F5 may be applied to the first intermediate image togenerate a second intermediate image, and the data changes associatedwith forward incremental F6 may be applied to the second intermediateimage to generate the full image of version V2 of Virtual Machine C.

In some embodiments, a data storage system may include a distributedscale-out software and storage stack that integrates backup datamanagement software with a storage target. The distributed scale-outsoftware may enable the data storage system to be scalable and run usingcommodity hardware. The data storage system may be used to backup one ormore virtual machines running within a virtualized environment or tobackup one or more applications associated with the one or more virtualmachines. Via communication with a virtualization manager, such asvirtualization manager 169 in FIG. 1A, the data storage system maydiscover the one or more virtual machines within the virtualizedenvironment and capture snapshots of the one or more virtual machinesover time. Each captured snapshot may correspond with a virtual machinelevel image of a virtual machine.

FIG. 3A is a flowchart describing one embodiment of a process formanaging and storing virtual machine snapshots using a data storagesystem. In one embodiment, the process of FIG. 3A may be performed by astorage appliance, such as storage appliance 170 in FIG. 1A.

In step 302, one or more virtual machines to be protected or backed upare identified. The one or more virtual machines include a first virtualmachine. The one or more virtual machines may be selected by an end userof a storage appliance, such as storage appliance 170 in FIG. 1A, usinga user interface provided by the storage appliance. In step 304, aschedule for backing up the first virtual machine is determined. In oneexample, the schedule for backing up the first virtual machine maycomprise periodically backing up the first virtual machine every fourhours. In step 306, a job scheduler is configured to implement theschedule for backing up the first virtual machine. In one example, adistributed job scheduler, such as distributed job scheduler 108 in FIG.1C, may be configured to schedule and run processes for capturing andstoring images of the first virtual machine over time according theschedule.

In step 308, a snapshot process for acquiring a snapshot of the firstvirtual machine is initiated. The snapshot process may send aninstruction to a virtualized infrastructure manager, such asvirtualization manager 169 in FIG. 1A, that requests data associatedwith the snapshot of the first virtual machine. In step 310, it isdetermined whether a full image of the first virtual machine needs to bestored in order to store the snapshot of the first virtual machine. Thedetermination of whether a full image is required may depend on whethera previous full image associated with a prior version of the firstvirtual machine has been acquired. If a full image needs to be stored,then step 311 is performed. Otherwise, if a full image does not need tobe stored, then step 312 is performed. In step 311, the full image ofthe first virtual machine is acquired. The full image of the firstvirtual machine may correspond with a file or one or more data chunks.In step 312, changes relative to a prior version of the first virtualmachine are acquired. The changes relative to the prior version of thefirst virtual machine may correspond with a file or one or more datachunks. In step 313, the full image of the first virtual machine isstored in a distributed file system, such as distributed file system 112in FIG. 1C. In step 314, the changes relative to the prior version ofthe first virtual machine are stored in a distributed file system, suchas distributed file system 112 in FIG. 1C. In one embodiment, the fullimage of the first virtual machine may be stored using a first storagedevice of a first type (e.g., a HDD) and the changes relative to theprior version of the first virtual machine may be stored using a secondstorage device of a second type (e.g., an SSD).

In some embodiments, snapshots of the first virtual machine may beingested at a snapshot capture frequency (e.g., every 30 minutes) by adata storage system. When a snapshot of the first virtual machine isingested, the snapshot may be compared with other snapshots storedwithin the data storage system in order to identify a candidate snapshotfrom which the snapshot may depend. In one example, a scalableapproximate matching algorithm may be used to identify the candidatesnapshot whose data most closely matches the data associated with thesnapshot or to identify the candidate snapshot whose data has the fewestnumber of data differences with the snapshot. In another example, anapproximate matching algorithm may be used to identify the candidatesnapshot whose data within a first portion of the candidate snapshotmost closely matches data associated with a first portion of thesnapshot. In some cases, a majority of the data associated with thesnapshot and the candidate snapshot may be identical (e.g., both thesnapshot and the candidate snapshot may be associated with virtualmachines that use the same operation system and have the sameapplications installed). Once the candidate snapshot has beenidentified, then data differences (or the delta) between the snapshotand the candidate snapshot may be determined and the snapshot may bestored based on the data differences. In one example, the snapshot maybe stored using a forward incremental file that includes the datadifferences between the snapshot and the candidate snapshot. The forwardincremental file may be compressed prior to being stored within a filesystem, such as distributed file system 112 in FIG. 1C.

In step 316, a merged file associated with the snapshot is generated.The merged file may reference one or more files or one or more datachunks that have been acquired in either step 311 or step 312. In oneexample, the merged file may comprise a file or a portion of a file thatincludes pointers to the one or more files or the one or more datachunks. In step 318, the merged file is stored in a metadata store, suchas distributed metadata store 110 in FIG. 1C. In step 320, a virtualmachine search index for the first virtual machine is updated. Thevirtual machine search index for the first virtual machine may include alist of files that have been stored in the first virtual machine and aversion history for each of the files in the list. In one example, thevirtual machine search index for the first virtual machine may beupdated to include new files that have been added to the first virtualmachine since a prior snapshot of the first virtual machine was takenand/or to include updated versions of files that were previously storedin the first virtual machine.

FIG. 3B is a flowchart describing one embodiment of a process forrestoring a version of a virtual machine using a data storage system. Inone embodiment, the process of FIG. 3B may be performed by a storageappliance, such as storage appliance 170 in FIG. 1A.

In step 332, a particular version of a virtual machine to be restored isidentified. In step 334, a base image from which the particular versionmay be derived is determined. In step 336, a set of incremental filesfor generating the particular version is determined. In one embodiment,the base image and the set of incremental files may be determined from amerged file associated with the particular version of the virtualmachine. In some cases, the set of incremental files may include one ormore forward incremental files and one or more reverse incrementalfiles. In step 338, a file associated with the particular version isgenerated using the base image and the set of incremental files. Thefile may be generated by patching the set of incremental files onto thebase image.

In one example, referring to FIG. 2G, if the particular versioncorresponds with Version V2 of Virtual Machine C, then the base imagemay correspond with the file Base in FIG. 2G and the set of incrementalfiles may correspond with files F1, F5, and F6 of FIG. 2G. In anotherexample, referring to FIG. 2G, if the particular version correspondswith Version V1 of Virtual Machine B, then the base image may correspondwith the file Base in FIG. 2G and the set of incremental files maycorrespond with files R1, R2, and F3 of FIG. 2G. In step 340, at least aportion of the file is outputted. The at least a portion of the file maybe transferred to a computing device, such as computing device 154 inFIG. 1A, or to a virtualization manager, such as virtualization manager169 in FIG. 1A.

In some embodiments, the base image and a subset of the set ofincremental files may correspond with a second virtual machine differentfrom the virtual machine (e.g., the second virtual machine may have beenbacked up prior to snapshots of the virtual machine being acquired andused to generate a dependent base file for the virtual machine). In thiscase, the base image may comprise the base image for the second virtualmachine and the set of incremental files may include a dependent basefile that comprises data differences between the base image for thesecond virtual machine and a previously acquired base image for thevirtual machine. Data deduplication techniques may be applied toidentify a candidate base image from which a dependent base file maydepend and to generate the dependent base file.

FIG. 3C is a flowchart describing one embodiment of a process forgenerating a dependent snapshot of a virtual machine and generating oneor more new versions of the virtual machine that derive from thedependent snapshot using a data storage system. In one embodiment, theprocess of FIG. 3C may be performed by a storage appliance, such asstorage appliance 170 in FIG. 1A.

In step 352, a dependent snapshot to be generated is identified. Thedependent snapshot depends from a particular version of a virtualmachine (e.g., the most recent version of the virtual machine or a priorpoint in time version of the virtual machine). In one embodiment, thedependent snapshot may correspond with a test snapshot of the particularversion of the virtual machine from which a new application may beinstalled and run prior to releasing the new application into aproduction environment. Changes to the test snapshot made by the newapplication may be stored as one or more new versions that derive fromthe dependent snapshot. In another embodiment, the dependent snapshotmay correspond with a mounted snapshot of the particular version of thevirtual machine from which a client may mount the mounted snapshot ofthe particular version and make subsequent modifications to the mountedsnapshot. The subsequent modifications may be stored as one or more newversions that derive from the dependent snapshot.

In step 354, a new merged file that corresponds with the dependentsnapshot is generated. In some cases, the new merged file may comprise aduplicate copy of the merged file associated with the particular versionof the virtual machine. In one example, referring to FIG. 2G, if theparticular version corresponds with Version VX of Virtual Machine A,then the new merged file may comprise a duplicate copy of the mergedfile associated with Version VX of Virtual Machine A. In this case, thenew merged file may be associated with a cloned virtual machine thatcomprises a cloned version of Version VX of Virtual Machine A. In step356, a set of data associated with one or more changes to the dependentsnapshot is acquired. In step 358, the set of data is stored as a newfile. The new file may comprise a forward incremental file. In oneembodiment, the new file may be stored using a distributed file system,such as distributed file system 112 and FIG. 1C. In another embodiment,the new file may be stored using a flash-based cache or an SSD. In step360, the new merged file is updated with a pointer to the new file inresponse to acquiring the set of data.

In one embodiment, the new file may correspond with changes to a clonedvirtual machine that comprises a cloned version of Version VX of VirtualMachine A in FIG. 2G. The changes to the cloned virtual machine mayoccur subsequent to the generation of the cloned virtual machine. Thenew file may correspond with a forward incremental file, such as forwardincremental F3 in FIG. 2G. In one example, the changes to the clonedvirtual machine may be associated with a modification to a databasestored on the cloned virtual machine or the installation of a newapplication on the cloned virtual machine.

In some cases, in response to a particular version of the virtualmachine being mounted, a storage appliance may generate a dependentsnapshot of the particular version of the virtual machine in order toallow modifications to the dependent snapshot without interfering withor corrupting the particular version of the virtual machine. Thedependent snapshot may correspond with a cloned virtual machine thatcomprises a cloned version of the particular version of the virtualmachine. The dependent snapshot may then be modified by a secondaryworkload that may read data from the dependent snapshot and write datato the dependent snapshot. In some cases, the dependent snapshot maycomprise a new full image of the particular version of the virtualmachine that may be directly modified by the secondary workload. Inother cases, modifications made to the dependent snapshot may be storedin a new file (e.g., a forward incremental) that includes the changes indata from the dependent snapshot.

In one embodiment, upon detection of a failure of a virtual machine(e.g., due to a hardware failure), the most recent version of thevirtual machine stored within a storage appliance may be identified andmade available to an application requiring data from the virtualmachine. In some cases, the most recent version of the virtual machinemay be made available via a dependent snapshot or a cloned virtualmachine that comprises a cloned version of the most recent version ofthe virtual machine. In cases where a dependent snapshot has beengenerated, the application may read and/or modify the data stored withinthe dependent snapshot without altering the contents of the most recentversion of the virtual machine stored within the storage appliance. Inone example, in response to detecting a failure of a virtual machine ora failure of a virtual disk of the virtual machine, a primary system mayquickly mount the most recent version of the virtual machine storedwithin a storage appliance and then continue reading and writing datafrom the mounted version without first restoring and transferring themost recent version of the virtual machine to the primary system.

FIG. 4A depicts one embodiment of a first set of stored files and asecond set of stored files. The first set of stored files may beassociated with one or more virtual machines prior to consolidation ofthe first set of stored files. The one or more virtual machines mayinclude an independent virtual machine (i.e., a virtual machine whoseversions derive from merged files that do not include pointers to dataassociated with a different virtual machine) with six different versionsthat correspond with files Base, R1-R3, and F1-F2. The one or morevirtual machines may include a first dependent virtual machine (i.e., avirtual machine whose versions derive from merged files that includepointers to data associated with an independent virtual machine)associated with file F3 and a second dependent virtual machineassociated with files F5-F6.

The second set of files may include one or more new files that have beengenerated using the first set of stored files in order to consolidatethe first set of files and to move a base image file (e.g., the fileBase) closer to a more recent version of the independent virtualmachine. As depicted, the one or more new files include files R11, R12,and Base2 (i.e., a new base image file). The one or more new files maycorrespond with a first version of the independent virtual machineassociated with the base image (Base), a second version of theindependent virtual machine associated with the new base image (Base2),and the versions of the independent virtual machine between the firstversion and the second version. The second set of files may also includea forward incremental file F7 that may include changes that haveoccurred subsequent to the generation of the new base image file Base2.

In one embodiment, a first merged file representing a version of thefirst dependent virtual machine associated with file F3 may not need tobe updated due to the relocation of the base image file to a more recentversion of the independent virtual machine. However, a second mergedfile representing a version of the second dependent virtual machineassociated with file F5 may need to be updated in order to point to thenew file R11. In one example, the second merged file may redirect apointer from pointing to the file F1 to point to the new file R11. Oncethe second merged file has been updated from referencing the file F1 toreferencing the new file R11, then the file F1 may be released frombeing stored or deleted.

FIG. 4B depicts one embodiment of a third set of stored files. The thirdset of stored files may be associated with one or more virtual machinesafter consolidation of the first set of stored files in FIG. 4A. Asdepicted, the independent virtual machine has six different versionsthat correspond with files Base2, R1-R3, and R11-R12. The firstdependent virtual machine is associated with file F3 and the seconddependent virtual machine is associated with files F5-F6. The files Baseand F1-F2 in FIG. 4A have been deleted. Merged files associated withversions of the second dependent virtual machine may include pointers tothe new file R11 and the new base image file Base2. In one embodiment,the second dependent virtual machine may correspond with a clonedversion of the independent virtual machine that is being used by asecondary workload. The secondary workload may be halted while themerged files associated the second dependent virtual machine are updatedto include pointers to the new file R11. In another embodiment, themerged files associated with versions of the second dependent virtualmachine may be updated to include pointers to the new file R11 once allapplications accessing the second dependent virtual machine have beenhalted or terminated.

FIGS. 4C-4D depict a flowchart describing one embodiment of a processfor managing and storing virtual machine snapshots using a data storagesystem. In one embodiment, the process of FIGS. 4C-4D may be performedby a storage appliance, such as storage appliance 170 in FIG. 1A.

In step 402, a first set of files associated with a plurality ofversions of a first virtual machine to be consolidated is identified. Inone example, the first set of files may include a base image file (e.g.,generated during a previous consolidation process) and one or more otherfiles associated with versions of the first virtual machine createdafter the base image file was generated. The one or more other files mayinclude one or more forward incremental files. In one embodiment, thedecision to consolidate the first set of files or to generate a new baseimage file such that the new base image file is closer to the mostrecent version of the first virtual machine than the base image file maybe determined based on a consolidation frequency (e.g., files associatedwith the first virtual machine may be consolidated every 8 hours, every24 hours, or every 72 hours). In another embodiment, the decision toconsolidate the first set of files or to generate a new base image filesuch that the new base image file is closer to the most recent versionof the first virtual machine than the base image file may be determinedbased on a number of forward incremental files that need to be patchedto the base image file in order to restore the most recent version ofthe first virtual machine. In one example, if the number of forwardincremental files that need to be patched to the base image file inorder to restore the most recent version of the first virtual machine isgreater than a threshold number of forward incremental files (e.g., morethan ten forward incremental files), then the first set of files may beconsolidated or identified for consolidation. In another embodiment, thedecision to consolidate the first set of files may be determined basedon a data size threshold corresponding with a summation of the filesizes for the forward incremental files that need to be patched to thebase image file in order to restore the most recent version of the firstvirtual machine. In one example, if the combined data size for theforward incremental files that need to be patched to the base image filein order to restore the most recent version of the first virtual machineis greater than a threshold data size (e.g., the sum of the file sizesfor the forward incrementals is greater than 20 MB), then the first setof files may be consolidated or identified for consolidation. In someembodiments, the first set of files may be automatically consolidated(e.g., without manual intervention) if a consolidation period has passedor expired (e.g., it has been more than 12 hours since the lastconsolidation occurred or since the base image file was generated), thetotal number of forward incremental files that need to be patched to thebase image file in order to restore the most recent version of the firstvirtual machine is greater than a threshold number of forwardincremental files, and/or the combined data size for the forwardincremental files that need to be patched to the base image file inorder to restore the most recent version of the first virtual machine isgreater than a threshold data size.

In step 404, a first version of the plurality of versions associatedwith a base file is determined. The base file may comprise a full image(or a complete image) of the first version of the first virtual machine.In step 406, a second version of the plurality of versions associatedwith a new base file to be generated is determined. The second versionmay correspond with a newer version of the virtual machine than thefirst version. In one example, the second version may comprise the mostrecent version of the first virtual machine. The most recent version ofthe first virtual machine may correspond with the latest or more recentsnapshot of the first virtual machine.

In step 408, the new base file is generated. In one example, the newbase file may be generated by generating a full image for the secondversion. The new base file may be generated by patching one or moreforward incremental files to the base file. The one or more forwardincremental files may correspond with one or more versions of the firstvirtual machine that were generated subsequent to the first version. Inone example, data changes (e.g., bit differences) associated with afirst forward incremental file of the one or more forward incrementalfiles may be applied to the data stored in the base file to generate anintermediate full image and data changes associated with a secondforward incremental file associated with the second version of the firstvirtual machine may be applied to the intermediate full image togenerate the new base file. In one example, the new base file maycorrespond with the new base image file Base2 in FIG. 4A.

In step 410, a first data integrity check is performed on the new basefile and/or on data read to generate the new base file. In one example,as data is read from a file system, such as distributed file system 112in FIG. 1C, storing the base file and one or more incremental files forgenerating the new base file, checksums may be computed using the dataand compared in order to detect errors within the data. As the data mayhave been replicated over a plurality of physical machines, such asphysical machine 120 and physical machine 130 in FIG. 1C, if a dataerror is detected, then the data error may be corrected using replicateddata and the corrected data (e.g., a new correct replica) may be writtento one or more of the plurality of physical machines. In anotherexample, as data is read from a file system to generate the new basefile, error correcting code (ECC) information may be generated based onthe data in order to detect and correct data errors that occurred duringtransmission or storage of the data. Upon detection of one or more dataerrors, the one or more data errors may be corrected and the correcteddata may be written to one or more of a plurality of physical machinessupporting the file system. One benefit of performing a data integritycheck as the new base file is generated is that data storage reliabilityof a data storage system may be improved.

In step 412, a set of reverse incremental files associated with thefirst version and one or more versions of the first virtual machinebetween the first version and the second version is generated. The setof reverse incremental files may correspond with data changes thatderive from the new base file. In one example, a first reverseincremental file of the set of reverse incremental files may include thedata changes (e.g., the bit differences) from the new base file and asecond reverse incremental file of the set of reverse incremental filesmay include the data changes from the new base file patched with thefirst reverse incremental file. In one example, the set of reverseincremental files may correspond with reverse incremental files R11-R12in FIG. 4A. In some cases, the set of reverse incremental files may becompressed prior to being stored within a file system, such asdistributed file system 112 in FIG. 1C. In step 414, a second dataintegrity check is performed on the set of reverse incremental filesand/or on data read to generate the set of reverse incremental files.One benefit of performing a data integrity check during consolidation oras the set of reverse incremental files is generated is that datastorage reliability of a data storage system may be improved. Moreover,periodically performing data integrity checks (e.g., during periodicconsolidations that occur on a daily or weekly basis) may allow for areduction in the degree of replication or a reduction in the number ofreplicas stored within a cluster.

In step 416, the new base file is written to a first storage device of afirst type. In step 418, the set of reverse incremental files is writtento a second storage device of a second type. In one example, the firststorage device of a first type may comprise a HDD and the second storagedevice of the second type a comprise an SSD. In another example, thefirst storage device of the first type may comprise a high density MLCflash-based SSD (e.g., 2-bits/cell or 3-bits/cell) and the secondstorage device of the second type may comprise a high performance SLCflash-based SSD. In another example, the first storage device of thefirst type may comprise a hybrid HDD/SSD drive and the second storagedevice of the second type may comprise an SSD. In another example, thefirst storage device of the first type may have a first read speedand/or a first write speed and the second storage device of the secondtype may have a second read speed that is faster than the first readspeed and/or a second write speed that is faster than the first writespeed. In another example, the first storage device of the first typemay have a first read latency and/or a first random access time and thesecond storage device of the second type may have a second read latencythat is less than the first read latency and/or a second random accesstime that is less than the first random access time speed. One benefitof storing the new base file in a first storage device of a first typeand the set of reverse incremental files in a second storage device of asecond type is that a particular version of the first virtual machinemay be quickly generated by performing a sequential read from the firststorage device (e.g., reading a single file from a HDD) to acquire thenew base file and, in parallel, performing one or more reads from thesecond storage device (e.g., performing fast random reads from an SSD)to acquire the set of reverse incremental files.

In step 420, a first set of merged files is updated to reference the newbase file. The first set of merged files may correspond with mergedfiles for the first version, the second version, and the versions of thefirst virtual machine between the first version and the second version.In one example, in reference to FIG. 2G, the first version maycorrespond with Version VY of Virtual Machine A, the second version maycorrespond with Version VW of Virtual Machine A, and the versions of thefirst virtual machine between the first version and the second versionmay correspond with Version VZ of Virtual Machine A.

In step 422, a backup policy associated with the first virtual machineis determined. The backup policy may specify one or more parameters forbacking up the first virtual machine in order to recover informationfrom the first virtual machine in the event that the first virtualmachine fails (e.g., due to a system failure). In one example, thebackup policy for the first virtual machine may specify that at most amaximum number of versions of the first virtual machine be stored (e.g.,a data storage system may store at most 100 backup versions of the firstvirtual machine). In the case that the maximum number of versions to bestored for a virtual machine is 100, the first 50 versions maycorrespond with daily snapshots of the virtual machine covering the past50 days and the last 50 versions may correspond with weekly snapshots ofthe virtual machine that cover the 50 weeks prior to the past 50 days.The backup policy may specify that a first number of historicalsnapshots of a virtual machine are stored for points in time within athreshold date from a current date (e.g., that 30 snapshots areavailable covering the past 30 days) and that a second number ofhistorical snapshots of the virtual machine are stored for points intime greater than the threshold date from the current date (e.g., that70 snapshots are available covering dates prior to the past 30 days).The backup policy for the first virtual machine may also specify thatonly versions of the first virtual machine associated with point in timesnapshots captured within a particular period of time be stored (e.g., adata storage system may only store backup versions of the first virtualmachine associated with point in time snapshots that were capturedwithin the past three years).

In one embodiment, the backup policy for the first virtual machine mayspecify that versions of the first virtual machine associated withpoints in time older than a particular time be moved from a secondstorage device (e.g., an SSD) to a first storage device (e.g., a HDD).In one example, incremental files associated with versions of the firstvirtual machine older than a particular time (e.g., older than sixmonths ago) be transferred from the second storage device to the firststorage device. The backup policy applied to a virtual machine maydepend on a classification of the virtual machine. In one example, avirtual machine may be classified as a gold-level virtual machine, asilver-level virtual machine, or a bronze-level virtual machine. Thebackup policy for a gold-level virtual machine may specify a greatermaximum number of versions to be stored than a silver-level virtualmachine or a bronze-level virtual machine. The backup policy for agold-level virtual machine may specify a longer period of time forstoring versions of the virtual machine than a silver-level virtualmachine or a bronze-level virtual machine.

In one embodiment, a virtual machine may be automatically classified,for example, as a gold-level virtual machine, a silver-level virtualmachine, or a bronze-level virtual machine based on a history ofrestoration requests for snapshots of the virtual machine. In oneexample, if more than ten snapshots of the virtual machine have beenrestored within a week of a current date, then the virtual machine maybe automatically classified as a gold-level virtual machine. In anotherexample, if no request for a restored snapshot of a virtual machine hasbeen received within a month of a current date, then the virtual machinemay be automatically classified as a bronze-level virtual machine. Inanother embodiment, a virtual machine may be automatically classifiedbased on a history of snapshot mounting requests for snapshots of thevirtual machine. Once the virtual machine has been automaticallyclassified, then a particular backup policy for the virtual machine maybe applied to the virtual machine based on the classification.

In step 424, a second set of reverse incremental files associated withversions of the first virtual machine that are older than the firstversion is identified based on the backup policy. In one example, thesecond set of reverse incremental files may correspond with versions ofthe first virtual machine that correspond with points in time thatoccurred more than six months from a current time. In another example,the second set of reverse incremental files may correspond with versionsof the first virtual machine that correspond with points in time thatoccurred more than one year from the time that the second version of thefirst virtual machine was created or more than one year from the timethat a snapshot associated with the second version was captured. In step426, the second set of reverse incremental files is moved from thesecond storage device to the first storage device. In some cases, thesecond set of reverse incremental files may be transferred from an SSDto a HDD. The second set of reverse incremental files may be transferredsuch that only the 50 most recent snapshots of the first virtual machineare stored on the SSD and all other snapshots of the first virtualmachine that were captured prior to the 50 most recent snapshots arestored on the HDD.

In one embodiment, a second set of reverse incremental files may beidentified based on a backup policy associated with the virtual machine.The backup policy may specify a maximum number of snapshots allowed forthe virtual machine for a particular time period. In one example, thebackup policy may specify that the maximum number of snapshots forsnapshots corresponding with points in time that occurred more than sixmonths from a current time must not be greater than a first number(e.g., not more than 100 snapshots). The second set of reverseincremental files may then be consolidated to free up storage space. Inone example, the second set of reverse incremental files may compriseten reverse incremental files and the second set of reverse incrementalfiles may be consolidated to generate a single consolidated filecorresponding with the earliest point in time snapshot of the tenreverse incremental files.

In step 428, a second set of merged files is updated to reference thenew base file. The second set of merged files may correspond with mergedfiles for a second virtual machine that include a pointer to the basefile. The second virtual machine may include dependent snapshots thatdepend on snapshots associated with the first virtual machine. In step430, it is detected that there is no dependency on the first set offiles. In one example, it may be detected that there is no dependency onthe first set of files if there are no merged files that includepointers to any of the first set of files. In step 432, the first set offiles is deleted in response to detecting that there is no dependency onthe first set of files. The first set of files may be deleted to free updata storage space within a data storage system.

FIG. 5A depicts one embodiment of a virtual machine search index, suchas virtual machine search index 106 in FIG. 1C. A virtual machine searchindex for a virtual machine may include a list, table, or other datastructure that stores mappings or pointers from different versions offiles stored on the virtual machine to different versions of the virtualmachine. As depicted, the virtual machine search index includes a listof file versions for File X that are stored on Virtual Machine A. Thelist of file versions for File X includes Versions X1-X4. Each of thefile versions includes a pointer to a particular version of VirtualMachine A that corresponds with the earliest point in time snapshot ofVirtual Machine A that includes the file version. For example, versionA23 of Virtual Machine A comprises the earliest point in time snapshotof Virtual Machine A that includes version X1 of File X and version A45of Virtual Machine A comprises the earliest point in time snapshot ofVirtual Machine A that includes version X2 of File X. The virtualmachine search index also includes a list of file versions for File Ythat are stored on Virtual Machine A. The list of file versions for FileY includes a mapping of version Y1 of File Y (saved at time T2) toversion A45 of Virtual Machine A and a mapping of version Y2 of File Y(saved at time T8 subsequent to time T2) to version A95 of VirtualMachine A. Version A45 of Virtual Machine A may comprise the 45^(th)version of Virtual Machine A.

FIG. 5B depicts one embodiment of a merged file for the version A45 ofVirtual Machine A referred to in FIG. 5A. The merged file includes afirst pointer (pBase) that references a base image (e.g., via the path/snapshots/VM_A/s100/s100.full) and other pointers to reverseincremental files (e.g., a pointer to reverse incremental file R55 viathe path /snapshots/VM_A/s45/s45.delta). In this case, version A45 ofVirtual Machine A may be generated by patching 55 reverse incrementalfiles onto the base image. However, rather than patching the reverseincremental files onto the entire base image, only a portion of the baseimage associated with a file to be restored (e.g., version X2 of File X)may be acquired from a file system and patched.

FIG. 5C depicts one embodiment of a first portion 502 of the base imagereferenced by the first pointer (pBase) in FIG. 5B and a second portion504 of the base image referenced by the first pointer (pBase) in FIG.5B. In some cases, rather than restoring an entire base image in orderto restore a particular version of a file, the first portion 502 of thebase image may be restored in order to identify a location of the filewithin the base image or to identify one or more regions within the baseimage that store the file. In one example, the first portion 502 of thebase image may correspond with one or more file system metadata files.The one or more file system metadata files may store informationregarding the type of file system used and information regarding everyfile and directory on a virtual volume or disk. In some cases, the oneor more file system metadata files may be located near the beginning orthe end of the base image or near the beginning or the end of a virtualdisk partition within the base image. The one or more file systemmetadata files may include NTFS metadata files, such as an NTFS MasterFile Table. The NTFS Master File Table may include information forretrieving files from an NTFS partition. The one or more file systemmetadata files may include a File Allocation Table. The one or more filesystem metadata files may include information for locating andretrieving files from a virtual disk within the base image (even whendue to fragmentation, the file is located in multiple regions within thevirtual disk).

Once the first portion 502 of the base image has been acquired and oneor more regions within the base image are identified that store the fileto be restored, the one or more regions of the base image including thesecond portion 504 of the base image may be read and patched with datafrom one or more reverse incremental files in order to generate aportion of a particular version of a virtual machine from which theparticular version of the file may be extracted. Thus, a particularversion of a file may be quickly extracted by using the virtual machinesearch index of FIG. 5A to identify a version of a virtual machine thatincludes the particular version of the file and then restoring only aportion of the version of the virtual machine that includes theparticular version of the file. One benefit of extracting the particularversion of the file from a small portion of the version of the virtualmachine (e.g., 2 MB) rather than from an entire image of the version ofthe virtual machine (e.g., 20 GB) is that the particular version of thefile may be restored in a shorter amount of time.

FIG. 5D is a flowchart describing one embodiment of a process forextracting a particular version of a file from one or more snapshots ofa virtual machine. In one embodiment, the process of FIG. 5D may beperformed by a storage appliance, such as storage appliance 170 in FIG.1A.

In step 512, a particular version of a file to be restored isidentified. The file may be stored on a virtual disk of a virtualmachine. The file may comprise or correspond with a database, aspreadsheet, a word processing document, an image file, a video file, atext file, an executable file, an audio file, an electronic message, oran email. The particular version of the file may be selected by an enduser of a storage appliance, such as storage appliance 170 in FIG. 1A,using a user interface provided by the storage appliance. In step 514, avirtual machine search index, such as virtual machine search index 106in FIG. 1C, for the virtual machine is acquired. In step 516, a versionof the virtual machine that includes the particular version of the fileis identified using the virtual machine search index. In step 518, amerged file corresponding with the version of the virtual machine isacquired. In step 520, a base image for generating the version of thevirtual machine is identified using the merged file. In step 522, a setof incremental files for generating the version of the virtual machineis identified using the merged file. In step 524, a first portion of thebase image that includes file system metadata for the virtual diskstoring the file is determined. In one embodiment, the file systemmetadata may include information for location and retrieving the filefrom the virtual disk. In one example, the file system metadata includesNTFS metadata.

In step 526, a portion of the version of the virtual machine isgenerated using the file system metadata and the set of incrementalfiles. In one embodiment, the portion of the version of the virtualmachine is generated by patching the set of incremental files to asecond portion of the base image. In another embodiment, the portion ofthe version of the virtual machine is generated by applying each of theset of incremental files to one or more chunks of data located withinthe base image. In step 528, the particular version of the file isextracted from the portion of the version of the virtual machine. Instep 530, the particular version of the file is outputted. Theparticular version of the file may be transferred to a computing device,such as computing device 154 in FIG. 1A, or to a virtualization manager,such as virtualization manager 169 in FIG. 1A. In one example, theoutputted file may correspond with a database that has been restored toa particular version of the database without having to perform a fullrestoration of an entire image of a virtual machine. One benefit ofextracting the particular version of the file from a portion of theversion of the virtual machine that includes the particular version ofthe file is that the particular version of the file may be quicklyrestored without having to first restore an entire image of the versionof the virtual machine.

In some embodiments, a particular version of a data object to berestored may be identified. The particular version of the data objectmay correspond with a particular point in time instance of the dataobject (e.g., a third snapshot of an electronic document captured at athird point in time). The data object may be stored on a virtual disk ofa virtual machine. The data object may comprise a database, aspreadsheet, a word processing document, an electronic document, animage, a video, a text file, an executable file, an audio recording, anelectronic message, or an email. A version of the virtual machine thatincludes the particular version of the data object may be identifiedusing a virtual machine search index. Once the version of the virtualmachine has been identified, metadata associated with the virtualmachine (e.g., file system metadata) may be read in order to identifyone or more regions within the virtual disk that store the data object.A portion of the version of the virtual machine may then be generated byreading and/or patching only the one or more regions within the virtualdisk that store the data object. The particular version of the dataobject may then be extracted using only the portion of the version ofthe virtual machine without having to extract or restore an entire imageof the version of the virtual machine.

FIG. 6A depicts one embodiment of a first set of stored files associatedwith different versions of a Virtual Machine A (VM A) and a second setof stored files associated with different versions of a Virtual MachineB (VM B). The first set of stored files includes a reverse incrementalR1, base image Base (corresponding with Version VX of Virtual MachineA), forward incremental F1, and forward incremental F2 (correspondingwith Version VY of Virtual Machine A). The second set of stored filesincludes a dependent base file Dependent_Base and forward incrementalsF7-F8. As depicted, the file Dependent_Base may comprise a dependentbase file that includes data differences that may be applied to the baseimage for Virtual Machine A (Base) in order to generate a first version(e.g., Version 1) of Virtual Machine B. In some cases, the dependentbase file may be considered a forward incremental file that depends fromthe base image for Virtual Machine A and may be used to generate thefirst version of Virtual Machine B. One benefit of generating the firstversion of Virtual Machine B using a dependent base file is that theversions of Virtual Machine B may be stored using less storage space.

FIG. 6B depicts one embodiment of a merged file for generating Version 1of Virtual Machine B using the stored files depicted in FIG. 6A. Themerged file includes a first pointer (pBase) that references the baseimage for Virtual Machine A (Base) and a second pointer(pDependent_Base) that references the dependent base file(Dependent_Base). In one embodiment, to generate a full image forVersion 1 of Virtual Machine B, the base image (Base) for VirtualMachine A may be acquired and the data changes associated with thedependent base file may be applied to the base image to generate thefull image for Version 1 of Virtual Machine B.

FIG. 6C depicts one embodiment of a first set of stored files associatedwith different versions of a Virtual Machine A (VM A) and a second setof stored files associated with different versions of a Virtual MachineB (VM B) after a first consolidation process has been performed on thefirst set of files in FIG. 6A. The first consolidation process maygenerate new files R12, R11, and Base2. The new files may allow a baseimage for Virtual Machine A to be moved closer to a more recent versionof Virtual Machine A. The first set of stored files includes a reverseincremental R1, reverse incremental R11, reverse incremental R12(corresponding with Version VX of Virtual Machine A), and base imageBase2 (corresponding with Version VY of Virtual Machine A). The secondset of stored files includes a dependent base file Dependent_Base andforward incrementals F7-F8. As depicted, the file Dependent_Base maycomprise a dependent base file that includes data differences that maybe applied to a full image of Version VX of Virtual Machine A in orderto generate a first version (e.g., Version 1) of Virtual Machine B.

FIG. 6D depicts one embodiment of a merged file for generating Version 1of Virtual Machine B using the stored files depicted in FIG. 6C. Themerged file includes a first pointer (pBase2) that references the baseimage for Virtual Machine A (Base2), a second pointer (pR11) thatreferences the reverse incremental R11, a third pointer (pR12) thatreferences the reverse incremental R12, and a fourth pointer(pDependent_Base) that references the dependent base fileDependent_Base. In one embodiment, to generate the full image of Version1 of Virtual Machine B, the base image for Virtual Machine A (Base2) maybe acquired, the data changes associated with reverse incremental R11may be applied to the base image to generate a first intermediate image,the data changes associated with reverse incremental R12 may be appliedto the first intermediate image to generate a second intermediate image,and the data changes associated with the dependent base fileDependent_Base may be applied to the second intermediate image togenerate the full image for Version 1 of Virtual Machine B.

FIG. 6E depicts one embodiment of a first set of stored files associatedwith different versions of a Virtual Machine A (VM A) and a second setof stored files associated with different versions of a Virtual MachineB (VM B) after a second consolidation process has been performed on thesecond set of files in FIG. 6C. The second consolidation process maygenerate new files R22, R21, and Dependent_Base2. The new files mayallow a most recent version of Virtual Machine B (e.g., Version 3 ofVirtual Machine B) to move closer to the base image for Virtual MachineA. The first set of stored files includes a reverse incremental R1,reverse incremental R11, reverse incremental R12 (corresponding withVersion VX of Virtual Machine A), and base image Base2 (correspondingwith Version VY of Virtual Machine A). The second set of stored filesincludes a dependent base file Dependent_Base2 and reverse incrementalsR21-R22. As depicted, the file Dependent_Base2 may comprise a dependentbase file that includes data differences that may be applied to a fullimage of Version VY of Virtual Machine A in order to generate a mostrecent version (e.g., Version 3) of Virtual Machine B.

FIG. 6F depicts one embodiment of a merged file for generating Version 1of Virtual Machine B using the stored files depicted in FIG. 6E. Themerged file includes a first pointer (pBase2) that references the baseimage for Virtual Machine A (Base2), a second pointer (pDependent_Base2)that references the dependent base file Dependent_Base2, a third pointer(pR21) that references the reverse incremental R21, and a fourth pointer(pR22) that references the reverse incremental R22. In one embodiment,to generate the full image of Version 1 of Virtual Machine B, the baseimage (Base2) for Virtual Machine A may be acquired, the data changesassociated with the dependent base file Dependent_Base2 may be appliedto the base image to generate a first intermediate image, the datachanges associated with the reverse incremental R21 may be applied tothe first intermediate image to generate a second intermediate image,and the data changes associated with the reverse incremental R22 may beapplied to the second intermediate image to generate the full image forVersion 1 of Virtual Machine B.

FIG. 6G depicts one embodiment of a first set of stored files associatedwith different versions of a Virtual Machine A (VM A), a second set ofstored files associated with different versions of a Virtual Machine B(VM B), and a third set of stored files associated with differentversions of a Virtual Machine C (VM C). The first set of stored filesincludes a reverse incremental R1, base image Base, and forwardincrementals F1-F2. The second set of stored files includes a firstdependent base file Dependent_Base and forward incrementals F7-F8. Thethird set of stored files includes a second dependent base fileDependent_Base3 and forward incremental F15. As depicted, the fileDependent_Base may comprise a first dependent base file that includesdata differences that may be applied to the base image for VirtualMachine A (Base) in order to generate a full image for a first version(e.g., Version 1) of Virtual Machine B and the file Dependent_Base3 maycomprise a second dependent base file that includes data differencesthat may be applied to a full image of the first version of VirtualMachine B in order to generate a first version (e.g., Version 1) ofVirtual Machine C. In some cases, the dependent base file Dependent_Basemay be considered a first forward incremental file that depends from thebase image for Virtual Machine A and may be used to generate the firstversion of Virtual Machine B and the dependent base file Dependent_Base3may be considered a second forward incremental file that depends fromboth the base image for Virtual Machine A and the dependent base fileDependent_Base and may be used to generate the first version of VirtualMachine C. One benefit of generating and applying dependent bases eitherin parallel (e.g., four dependent virtual machines may each be derivedfrom a base image file for an independent virtual machine) or in series(e.g., a first dependent virtual machine may be derived from anindependent virtual machine and a second dependent virtual machine maybe derived from the first dependent virtual machine) is that the amountof data storage space required to store the different versions ofvirtual machines may be reduced and the deduplication rate may beincreased.

FIG. 6H depicts one embodiment of a merged file for generating Version 1of Virtual Machine C using the stored files depicted in FIG. 6G. Themerged file includes a first pointer (pBase) that references the baseimage for Virtual Machine A, a second pointer (pDependent_Base) thatreferences the dependent base file for Virtual Machine B, and a thirdpointer (pDependent_Base3) that references the dependent base fileDependent_Base3 for Virtual Machine C. In one embodiment, to generatethe full image of Version 1 of Virtual Machine C, the base image (Base)for Virtual Machine A may be acquired, the data changes associated withthe dependent base file Dependent_Base may be applied to the base imageto generate a first intermediate image, and the data changes associatedwith the dependent base file Dependent_Base3 may be applied to the firstintermediate image to generate the full image for Version 1 of VirtualMachine C.

In a virtualized environment, redundancy in data stored on two or moredifferent virtual machines may occur due to a common operation systemused by the virtual machines (e.g., 100 virtual machines within thevirtualized environment may run the same operating system) or due to thecloning of virtual machines within the virtualized environment. A clonedvirtual machine may include the same operating system and applicationsas a virtual machine from which the cloned virtual machine was cloned.In some cases, in a virtualized environment supporting an enterprise,many of the virtual machines used by employees of the enterprise maycomprise cloned virtual machines that include a significant amount ofredundancy due to the installation of a common operating system andcommon applications (e.g., more than 85% of the data may be redundant).The commonality between different virtual machines may allow a virtualmachine to be efficiently stored as a dependent virtual machine that maybe derived from an independent virtual machine. The dependent virtualmachine may be associated with a dependent base file that is stored onthe same physical machine as a base image associated with theindependent virtual machine. The dependent base file and the base imagemay reside on two different storage devices within the same physicalmachine. In some cases, to reduce the time needed to restore a versionof the dependent virtual machine, the dependent base file and otherincremental files associated with the dependent virtual machine may bestored in an SSD of the physical machine and the base image associatedwith the independent virtual machine may be stored in a HDD of thephysical machine.

FIG. 6I is a flowchart describing one embodiment of a process forstoring snapshots of a virtual machine. In one embodiment, the processof FIG. 6I may be performed by a storage appliance, such as storageappliance 170 in FIG. 1A.

In step 612, an initial snapshot of a first virtual machine is acquired.The initial snapshot may be acquired from a virtualization manager, suchas virtualization manager 169 in FIG. 1A. The initial snapshot of thevirtual machine may comprise the first point in time version of thefirst virtual machine saved to a storage appliance, such as storageappliance 170 FIG. 1A. The initial snapshot may include a full image ofthe first virtual machine or a full image of one or more virtual disksassociated with the first virtual machine. In some cases, a signaturemay be generated for each virtual disk of a virtual machine. In othercases, a signature may be generated for an entire virtual machine thatincludes one or more virtual disks.

In step 614, a signature for the initial snapshot is generated. In oneexample, the signature may include one or more hash values. In anotherexample, the signature may include a fixed-length value (e.g., 1 KB or 4B in size) that is statistically unique to the full image. The signaturemay be generated using a similarity hashing algorithm. One embodiment ofa process for generating a signature of a snapshot is described later inreference to FIG. 6J.

In step 616, a second virtual machine is identified based on thesignature. The second virtual machine is associated with a base image.The second virtual machine may comprise a previously backed up virtualmachine and may be associated with a second signature. The secondvirtual machine may be identified based on a comparison of the signaturewith the second signature. In one embodiment, the second virtual machinemay comprise the virtual machine out of a plurality of virtual machineswith the closest matching signature to the signature associated with theinitial snapshot of the first virtual machine. In some cases, a nearestneighbor search may be performed on a plurality of signatures associatedwith a plurality of virtual machines in order to identify the secondvirtual machine.

In step 618, a dependent base file is generated using the full image andthe base image. The dependent base file may be generated by determiningthe data differences between the full image and the base image. The datadifferences may comprise bit differences between the full image and thebase image that are determined using a bitwise XOR operation. In oneexample, the dependent base file may comprise a forward incremental filethat depends from the base image for the second virtual machine and fromwhich the full image may be generated. In step 620, a merged file isgenerated for the initial snapshot. The merged file may include a firstpointer to the base image and a second pointer to the dependent basefile. In step 622, the merged file and the signature may be stored in ametadata store, such as distributed metadata store 110 in FIG. 1C.

In step 624, the dependent base file is written to a first storagedevice of a first type. The dependent base file may be compressed priorto being written to the first storage device. In one embodiment, thebase image for the second virtual machine may be located on a firstphysical machine and the first storage device may be located on thefirst physical machine. By locating both the base image and thedependent base file on the same physical machine, network traffic may bereduced and the time to restore versions of the first virtual machinemay be reduced.

In one embodiment, both the base image and the dependent base file maybe located on the first storage device (e.g., an SSD). In anotherembodiment, the base image for the second virtual machine may be storedon a second storage device of a second type different from the firststorage device of the first type. In one example, the dependent basefile may be stored using a flash-based memory and the base image may bestored using a HDD. In order to restore the full image, the dependentbase file and any other incremental files may be read from the firststorage device of the first type and, in parallel, the base image may beread from the second storage device of the second type (e.g., the baseimage may be read by performing a sequential read from a HDD).

FIG. 6J is a flowchart describing one embodiment of a process forgenerating a signature of a snapshot. The process described in FIG. 6Jis one example of a process for implementing step 614 in FIG. 6I. In oneembodiment, the process of FIG. 6J may be performed by a storageappliance, such as storage appliance 170 in FIG. 1A.

In step 632, one or more blocks within a full image are determined. Thefull image may be associated with a snapshot of a virtual machine. Thefull image may correspond with a state of a virtual disk of the virtualmachine. In one example, the one or more blocks may comprise sampleddata regions associated with a portion of the full image. In anotherexample, the one or more blocks may comprise a set of noncontiguous dataregions within the full image. The set of noncontiguous data regions mayinclude a first data region that does not border or overlap with asecond data region of the set of noncontiguous data regions. In somecases, the one or more blocks may be arranged in a manner that allows agreater number of hash values to be computed near the beginning or theend of the full image. For example, the one or more blocks may bearranged such that a percentage (e.g., 80%) of the one or more blocksare located within a first portion of the full image (e.g., within thefirst 2 GB of data). One reason for the increased sampling or weightingof the first portion of the full image is that a common operating systemmay reside in the first portion of the full image (e.g., the commonoperating system may reside in the first 1 GB of the full image).

In one embodiment, a first set of data blocks (e.g., 100 4 KB datablocks) may be identified within the full image. Each block of the firstset of data blocks may be located within a different region of the fullimage compared to the other data blocks. Each block of the first set ofdata blocks may correspond with a different portion of the full imagecompared with the other data blocks of the first set of data blocks. Inone example, a first subset of the first set of data blocks (e.g., thefirst 50 out of 100 data blocks) may be arranged such that a data blockof the first subset is located at the beginning of every 16 MB (or anyother fixed data length) of data in the full image. In the case that thefirst subset of data blocks are arranged every 16 MB, then the offsetsfor the first subset of data blocks may be at 0, 16 MB, 32 MB, . . . ,and 784 MB. In the case that the first subset of data blocks arearranged every 4 MB, then the offsets for the first subset of datablocks may be at 0, 4 MB, 8 MB, . . . , and 196 MB. In one example, asecond subset of the first set of data blocks (e.g., the last 50 out of100 data blocks) may be arranged such that the data blocks arepositioned at increasingly greater distances from each other. In thiscase, the offsets for the second subset of data blocks may be at 1 GB,1.1 GB, 1.3 GB, 1.6 GB, 2 GB, 2.5 GB, etc. In another example, a secondsubset of the first set of data blocks (e.g., the last 50 out of 100data blocks) may be arranged such that the data blocks are positioned atmonotonically increasing distances from each other. In this case, theoffsets for the second subset of data blocks may be at 1 GB, 1.1 GB, 1.2GB, 1.5 GB, 2 GB, 3 GB, etc.

In some embodiments, the first set of data blocks identified within thefull image may be arranged such the data blocks of the first set of datablocks are spaced at monotonically increasing distances from each other.In other embodiments, the first set of data blocks may be arranged suchthat a majority of the first set of data blocks are located within afirst portion of the full image that is located near or at a beginningor an end of the full image. In one embodiment, each data block of thefirst set of data blocks exists within a first portion of the full image(e.g., only the first 1.5 GB or other fixed data length of data withinthe full image may be sampled).

In step 634, one or more hash values corresponding with the one or moreblocks are determined. In one embodiment, each of the one or more hashvalues may be determined using a hash function, such as MD5, SHA2-56, orCRC32. In one example, a first hash value corresponding with a firstdata block of the one or more blocks may be computed using a hashfunction and a second hash value corresponding with a second data blockof the one or more blocks may be computed using the hash function. Instep 636, a signature is generated based on an ordered list of the oneor more hash values. In one embodiment, if the hash function forgenerating the one or more hash values comprises CRC32 and the number ofone or more blocks comprises 100 data blocks, then the signature maycomprise an ordered list of 100 4 B values. To compare a first signaturewith a second signature, each hash value in the ordered list of hashvalues for the first signature may be compared with a corresponding hashvalue in the ordered list of hash values for the second signature. Amatching score may be determined based on the number of matched hashesdivided by the number of total hashes. In one example, if the number ofordered hash values comprises 100 hash values and the number of matchinghash values comprises 70 hash values, then the matching score maycomprise 0.7. In this case, a matching score of 1.0 would indicate thatall of the ordered hash values between a first signature and a secondsignature matched. In some cases, if the highest matching score for avirtual machine is less than a threshold value (e.g., is less than 0.5),then the virtual machine may be stored as an independent virtualmachine.

In one embodiment, a plurality of noncontiguous data blocks within afull image of a virtual machine may be sampled (e.g., 100 4 KB datablocks out of a full image comprising 100 GB) and a plurality of hashvalues corresponding with the plurality of noncontiguous data blocks maybe generated. A signature for the virtual machine may comprise anordered list of the plurality of hash values. The plurality ofnoncontiguous data blocks may be arranged such that data blocks of afirst plurality of the plurality of noncontiguous data blocks (e.g., thefirst 30 out of 100 data blocks) are spaced at a fixed distance fromeach other and data blocks of a second plurality of the plurality ofnoncontiguous data blocks (e.g., the last 70 out of 100 data blocks) arespaced at monotonically increasing distances from each other. In thiscase, each data block of the first plurality may be spaced apart orseparated by a fixed data length (e.g., every 16 MB) and each data blockof the second plurality may be spaced apart or separate by an increasingdata length (e.g., the first two data blocks of the second plurality maybe spaced apart by 0.1 GB and the next two data blocks of the secondplurality may be spaced apart by 0.2 GB). In some cases, the firstplurality of the plurality of noncontiguous data blocks may bedetermined based on a size and/or a location of an operating systemwithin the full image.

In one embodiment, a size of an operating system or a memory footprintassociated with the operating system may be acquired and used toidentify a first portion of a full image of a virtual machine (e.g., thefirst portion of the full image may be located at the beginning of thefull image and correspond with the size of the operating system, such asthe first 0.5 GB of the full image). In this case, a first set of datablocks may be sampled within the first portion of the full image and aset of hash values corresponding with the first set of data blocks maybe generated. A portion of a signature for the virtual machine maycomprise an ordered list of the set of hash values. The first set ofdata blocks may be arranged such that the data blocks of the first setof data blocks are spaced at a fixed distance from each other or arespaced at monotonically increasing distances from each other.

In some embodiments, a dependent virtual machine may depend from a firstindependent virtual machine at a first point in time and then dependfrom a second independent virtual machine different from the firstindependent virtual machine at a second point in time subsequent to thefirst point in time. In one example, the best matching independentvirtual machine for the dependent virtual machine (e.g., the virtualmachine with the highest matching score) at the first point in time maycomprise the first independent virtual machine and the best matchingindependent virtual machine for the dependent virtual machine at thesecond point in time may comprise the second independent virtualmachine. In some cases, the updating of the independent virtual machineused for deriving a dependent virtual machine may be performedperiodically (e.g., every month).

In some embodiments, a data management system including one or morestorage appliances may store a first set of snapshots of a virtualmachine on a first storage appliance within a first storage domain(e.g., an on-premise or local storage appliance) and a second set ofsnapshots of the virtual machine on a second storage appliance within asecond storage domain (e.g., a remote storage appliance) or within acloud-based storage service. In one example, the first set of snapshotsmay comprise the 50 most recent snapshots of the virtual machine and thesecond set of snapshots may comprise all the other snapshots of thevirtual machine. In another example, the first set of snapshots maycomprise all snapshots of a virtual machine captured within the pastyear and the second set of snapshots may comprise all snapshots of thevirtual machine captured within the past five years. In another example,a storage appliance, such as storage appliance 170 in FIG. 1A, maymanage and store a first set of snapshots comprising all snapshots of avirtual machine captured within a first period of time (e.g., within thepast three months) and the storage appliance may push all snapshots ofthe virtual machine captured within a second period of time (e.g.,within the past ten years) to a remote storage appliance or acloud-based storage service. In some cases, a cloud-based storageservice may run an integrated software stack including a data managementsystem, such as data management system 102 in FIG. 1C, a distributed jobscheduler, a distributed metadata store, and a distributed file system.One benefit of managing and storing snapshots of one or more virtualmachines using a hybrid local/remote data management system thatincludes a local storage appliance and a remote storage appliance and/ora cloud-based storage service is that the hybrid local/remote datamanagement system may provide near instantaneous restoration of thesnapshots of the one or more virtual machines while providingdisaster-resistant data protection in the event that the first storageappliance or the remote storage appliance fails.

FIG. 7A depicts one embodiment of a first set of stored files associatedwith different versions of a Virtual Machine A (VM A) and a second setof stored files associated with different versions of a Virtual MachineB (VM B) located within a first storage domain (Storage Domain A). Thefirst set of stored files includes a base image associated with VirtualMachine A (Base_A) and the second set of stored files includes a baseimage associated with Virtual Machine B (Base_B). In some cases, theVirtual Machine B may be associated with a reverse incremental RB1 thatis stored within the first storage domain (e.g., a local storageappliance) and 728 other reverse incrementals that are stored within asecond storage domain (e.g., within a remote storage appliance or acloud-based storage service) different from the first storage domain. Inone example, in order generate a full image for one of the versions ofVirtual Machine B associated with the 728 other reverse incrementals,one or more of the 728 reverse incrementals may be transferred to thefirst storage domain from the second storage domain and the full imagemay be generated within the first storage domain. In this case, the oneor more of the 728 reverse incrementals transferred to the first storagedomain may be cached within the first storage domain for future accessto the same data. In another example, in order generate a full image forone of the versions of Virtual Machine B associated with the 728 otherreverse incrementals, the full image may be generated within the secondstorage domain and then transferred to the first storage domain.

FIG. 7B depicts one embodiment of a merged file for generating Version732 of Virtual Machine B using the stored files depicted in FIG. 7A. Themerged file includes a first pointer (pBase_B) that references the baseimage for Virtual Machine B (Base_B), a second pointer (pFB1) thatreferences the forward incremental FB1, and a third pointer (pFB2) thatreferences the forward incremental FB2. In one embodiment, to generate afull image for Version 732 of Virtual Machine B, the base image (Base_B)for Virtual Machine B may be acquired, the data changes associated withthe forward incremental FB1 may be applied to the base image to generatea first intermediate image, and the data changes associated with forwardincremental FB2 may be applied to the first intermediate image togenerate the full image of Version 732 of Virtual Machine B.

FIG. 7C depicts one embodiment of a third set of stored files associatedwith different versions of the Virtual Machine A (VM A) depicted in FIG.7A and a fourth set of stored files associated with different versionsof the Virtual Machine B (VM B) depicted in FIG. 7A located within asecond storage domain (Storage Domain B) different from the firststorage domain (Storage Domain A) depicted in FIG. 7A. In some cases,the first storage domain may communicate with the second storage domainvia a network, such as a wide area network or the Internet. The thirdset of stored files includes a base image associated with VirtualMachine A (Base_A) and the fourth set of stored files includes adependent base file associated with Virtual Machine B(Dependent_Base_B). As depicted, Virtual Machine A is associated with 58different versions corresponding with a forward incremental FA1, a baseimage Base_A, and 56 reverse incrementals RA1-RA56. Virtual Machine B isassociated with 732 different versions corresponding with a forwardincrementals FB1-FB2, a dependent base file Dependent_Base_B, and 729reverse incrementals RB1-RB729. In some cases, the second storage domainmay include a remote storage appliance or a cloud-based storage service.

FIG. 7D depicts one embodiment of a merged file for generating Version732 of Virtual Machine B using the stored files depicted in FIG. 7C. Themerged file includes a first pointer (pBase_A) that references the baseimage for Virtual Machine A (Base_A), a second pointer(pDependent_Base_B) that references the dependent base file for VirtualMachine B (Dependent_Base_B), a third pointer (pFB1) that references theforward incremental FB1, and a fourth pointer (pFB2) that references theforward incremental FB2. In one embodiment, to generate a full image forVersion 732 of Virtual Machine B, the base image for Virtual Machine A(Base_A) may be acquired and the data changes associated with thedependent base file associated with Virtual Machine B (Dependent_Base_B)may be applied to the base image to generate a first intermediate image,the data changes associated with forward incremental FB1 may be appliedto the first intermediate image to generate a second intermediate image,and the data changes associated with forward incremental FB2 may beapplied to the second intermediate image to generate the full image ofVersion 732 of Virtual Machine B.

In one embodiment, the first storage domain in FIG. 7A may comprise alocal storage domain within a local data center and the second storagedomain in FIG. 7C may comprise a remote storage domain within a remotedata center. The files stored within the local storage domain may bestored using a first storage appliance, such as storage appliance 170 inFIG. 1A. The files stored in the remote storage domain may be storedusing a second storage appliance, such as storage appliance 140 in FIG.1A. In another embodiment, the first storage domain in FIG. 7A maycomprise a remote storage domain and the second storage domain in FIG.7C may comprise a local storage domain.

In some embodiments, a first storage appliance may determine whetherfiles stored within the first storage appliance are to be archived ortransferred to a second storage appliance based on a threshold number ofversions. In one example, once a total number of versions of a virtualmachine stored within the first storage appliance reaches a maximumnumber of versions, then the oldest versions of the virtual machine thatcause the maximum number of versions to be exceeded may be transferredto the second storage appliance or to a cloud-based storage device. Inanother example, if a maximum number of versions for a first storageappliance storing the first set of stored files associated with VirtualMachine A in FIG. 7A is three, then the 55 versions of Virtual Machine Athat are older than the version associated with reverse incremental RA1may be transferred to a second storage appliance, such as the secondstorage appliance storing the third set of stored files in FIG. 7C. The55 versions of Virtual Machine A transferred to the second storageappliance may correspond with reverse incrementals RA2-RB56 in FIG. 7C.

In some embodiments, a first storage appliance may determine whetherfiles stored within the first storage appliance are to be archived ortransferred to a second storage appliance based on a threshold point intime. In one example, once a particular version of a virtual machineassociated with a particular point in time is older than the thresholdpoint in time (e.g., the particular point in time is older than threemonths from a current time), then the particular version may betransferred to the second storage appliance or to a cloud-based storagedevice. In another example, if 728 versions of Virtual Machine B in FIG.7A are older than a threshold point in time (e.g., more than 30 days oldor more than one year old), then the 728 versions of Virtual Machine Bmay be transferred to a second storage appliance, such as the secondstorage appliance storing the fourth set of stored files in FIG. 7C. The728 versions of Virtual Machine B transferred to the second storageappliance may correspond with reverse incrementals RB2-RB729 in FIG. 7C.

In some embodiments, in order to minimize network congestion, dataassociated with virtual machine snapshots may be deduplicated and/orcompressed prior to being transferred from a first storage domain to asecond storage domain. In one example, a dependent base file or a baseimage may be compressed using a lossless data compression algorithm suchas LZ4 or LZ77 prior to being transferred to the second storage domain.

In some embodiments, rather than transferring a base image associatedwith a virtual machine from a first storage domain to a second storagedomain, a dependent base file that derives from another base imagewithin the second storage domain may be transferred instead. In oneexample, rather than transferring the base image associated with VirtualMachine B (Base_B) in FIG. 7A to the second storage domain, a dependentbase file (Dependent_Base_B) may be generated in the first storagedomain and transferred to the second storage domain if the base imageassociated with Virtual Machine A (Base_A) from which the dependent basefile depends exists within the second storage domain. In some cases, afirst storage appliance within the first storage domain may identify abase image from which a dependent base file may be derived by acquiringa list of independent virtual machines within the second storage domain,determining a matching signature score (e.g., determined based on anumber of matched hashes) for each independent virtual machine on thelist of independent virtual machines that exists within the firststorage domain, and identifying the independent virtual machine storedwithin the first storage domain with the highest matching signaturescore. In one embodiment, a dependent base file associated with avirtual machine may be transferred in place of a base image for thevirtual machine based on a classification of the virtual machine. Forexample, if the virtual machine is classified as a gold-level virtualmachine, then the base image may be transferred to the second storagedomain. However, if the virtual machine is classified as a bronze-levelvirtual machine, then the dependent base file may be transferred to thesecond storage domain.

FIG. 7E is a flowchart describing one embodiment of a process formanaging snapshots of a virtual machine using a hybrid local/remote datamanagement system. In one embodiment, the process of FIG. 7E may beperformed by a storage appliance, such as storage appliance 170 in FIG.1A.

In step 712, an initial snapshot of a first virtual machine is acquired.The initial snapshot may be acquired from a virtualization manager, suchas virtualization manager 169 in FIG. 1A. The initial snapshot of thevirtual machine may comprise the first point in time version of thefirst virtual machine saved to a storage appliance, such as storageappliance 170 FIG. 1A. The initial snapshot may include a full image ofthe first virtual machine or a full image of one or more virtual disksassociated with the first virtual machine. In one embodiment, asignature may be generated from the full image associated with theinitial snapshot in order to identify a candidate base image associatedwith a second virtual machine. In one example, a signature may begenerated for the entire first virtual machine or for a first virtualdisk of the first virtual machine in order to identify the candidatebase image.

In step 714, a full image associated with the initial snapshot is storedwithin a first storage domain. The full image may be stored using alocal storage appliance within the first storage domain. In step 716,one or more snapshots of the first virtual machine are acquiredsubsequent to acquiring the initial snapshot. In one example, theinitial snapshot of the first virtual machine may comprise a firstversion of the first virtual machine and the one or more snapshots ofthe first virtual machine may comprise one or more subsequent versionsof the first virtual machine. In step 718, one or more incremental filesassociated with the one or more snapshots are stored within the firststorage domain. The one or more incremental files may be stored usingthe local storage appliance within the first storage domain. The one ormore incremental files may include one or more forward incremental filesand/or one or more reverse incremental files.

In step 720, a base image associated with a second virtual machinedifferent from the first virtual machine is identified. The secondvirtual machine may comprise a virtual machine that is stored within thefirst storage domain and that is stored within a second storage domainwith the highest matching signature score or the most data similaritywith the full image stored within the first storage domain. In step 722,a dependent base file is generated using the full image and the baseimage. In step 724, the dependent base file is transferred to a secondstorage domain. In one embodiment, the second storage domain maycomprise a remote storage appliance. In another embodiment, the secondstorage domain may comprise a cloud-based storage service.

In step 726, a maximum number of snapshots and a maximum age forsnapshots are acquired. In one example, the maximum number of snapshotsmay impose a limit to the number of versions of the first virtualmachine that may be stored within the first storage domain. In anotherexample, the maximum age for snapshots may impose a limit on the numberof versions of the first virtual machine that may be stored within thefirst storage domain. In step 728, it is determined that the one or moreincremental files associated with the one or more snapshots should betransferred to the second storage domain based on the maximum number ofsnapshots and/or the maximum age for snapshots. In step 730, the one ormore incremental files are transferred to the second storage domain. Insome cases, after the one or more incremental files have beentransferred to the second storage domain, the one or more incrementalfiles may be deleted from the first storage domain to free-up storagespace within the first storage domain.

In some cases, one or more snapshots of the first virtual machine may betransferred to the second storage domain upon detection that the firststorage domain stores more than a threshold number of snapshots for thefirst virtual machine. In other cases, every snapshot of the firstvirtual machine that is stored within the first storage domain may beautomatically transferred to the second storage domain. The snapshots ofthe first virtual machine may be directly accessed via the first storagedomain or the second storage domain. In response to a request from thefirst storage domain, the second storage domain may transfer a snapshotof the first virtual machine to the first storage domain (e.g., asnapshot that was originally transferred from the first storage domainto the second storage domain may be transferred back to the firststorage domain).

In one embodiment, a hybrid local/remote data management system mayinclude a remote replication system that replicates data between a localstorage appliance and a remote storage appliance and/or a cloud-basedstorage service in real-time. The replicated data may be deduplicatedand compressed prior to being transferred between the local storageappliance and the remote storage appliance or the cloud-based storageservice. The hybrid local/remote data management system may include ahybrid data management system that manages snapshots of one or morevirtual machines across a local storage appliance and a remote storageappliance and/or a cloud-based storage service in real-time. The hybriddata management system may dynamically move data associated with thesnapshots based on user configured parameters such as a maximum numberof snapshots that may be stored on the local storage appliance, amaximum number of snapshots that may be stored on the remote storageappliance, a maximum age for the snapshots stored on the local storageappliance, and a maximum age for the snapshots stored on the remotestorage appliance. In some cases, the hybrid data management system maycause a first set of snapshots for the one or more virtual machines tobe stored on the local storage appliance, a second set of snapshots forthe one or more virtual machines to be stored on the remote storageappliance, and a third set of snapshots for the one or more virtualmachines to be stored on both the local storage appliance and the remotestorage appliance (e.g., the third set of snapshots may comprisereplicated snapshots).

In one embodiment, a virtualized environment cloning application may beused to create a cloned environment of a set of virtualized productionservices running on a plurality of virtual machines within a productionenvironment. The virtualized environment cloning application maycomprise a software-level component of a storage appliance or anapplication running on a storage appliance, such as storage appliance170 in FIG. 1C. The virtualized environment cloning application maygenerate the cloned environment to enable the testing of new featureswithin the cloned environment or for experimental or analyticalpurposes. The cloned environment may include a plurality of clonedvirtual machines that are derived from snapshots of the plurality ofvirtual machines within the production environment at a particular pointin time. In one example, the cloned environment may comprise a virtuallaboratory of networked virtual machines in which applications may betested without interfering with the production environment.

The set of virtualized production services may include a first service(e.g., a database service) and a second service that depends on thefirst service (e.g., an inventory management application that depends onthe database service). The first service may be run using a firstvirtual machine of the plurality of virtual machines and the secondservice may be run using a second virtual machine of the plurality ofvirtual machines. In some cases, upon a selection of the second servicefor cloning (e.g., via a GUI selection by an end user of a storageappliance), other services on which the second service relies, such asthe first service, may be automatically identified due to dependencieswith the second service. The dependencies may be identified via adependency mapping table stored within a distributed metadata store,such as distributed metadata store 110 in FIG. 1C. Once the set ofvirtualized production services have been identified, each of the set ofvirtualized production services may be paused or quiesced whilesnapshots of the plurality of virtual machines running the set ofvirtualized production services are captured. While the set ofvirtualized production services are paused, a virtualization interface,such as virtualization interface 104 in FIG. 1C, may be used to acquirethe snapshots of the plurality of virtual machines. Once the snapshotsof the plurality of virtual machines have been acquired, then clonedversions of the plurality of virtual machines may be generated andstored using a distributed file system, such as distributed file system112 in FIG. 1C.

In cases where the cloned versions of the plurality of virtual machinesmust be configured with the same IP addresses as the plurality ofvirtual machines within the production environment (e.g., due to theinability of a backup system to modify an application specificconfiguration that includes an IP address), the cloned environment mayhave to be brought up in a private network to prevent conflicts with theplurality of virtual machines within the production environment. In oneembodiment, a gateway virtual machine may be configured to act as agateway between the cloned environment and an outside network. Allrequests to IP addresses that are not part of the cloned environment maybe routed through the gateway virtual machine to the outside network.The gateway may act as a Network Address Translation (NAT) layer forexternal clients that want to connect to the cloned environment from theoutside network. Each of the virtualized production services within thecloned environment may be exposed through separate IP addresses to theoutside network and requests may be routed to the appropriate virtualizeproduction service by the NAT layer.

In some cases, runbook automation techniques or other workflowautomation techniques may be used to generate and bring up the clonedversions of the plurality of virtual machines in an appropriate ordersuch that a cloned virtual machine is not brought up until dependentvirtual machines have been brought up and the applications running onthe dependent virtual machines are running. The appropriate order may bespecified using a configuration file that may be created and/or bemodified by a system administrator or a virtualization administratorprior to generation of the cloned versions. In one example, in the caseof a web server that relies on a database to display a web site, thedatabase may be automatically brought up first in the cloned environmentbefore the web server is brought up since the web server may experienceerrors if it is not able to access the database.

FIG. 8 is a flowchart describing one embodiment of a process forautomating the generation of a cloned virtual machine environment. Inone embodiment, the process of FIG. 8 may be performed by a storageappliance, such as storage appliance 170 in FIG. 1A.

In step 802, an application running on a first virtual machine isidentified. The application may be identified by an end user of astorage appliance using a graphical user interface. The application maycomprise an application to be cloned. The application may comprise oneapplication of a plurality of applications running on the first virtualmachine in which the first virtual machine is to be cloned. The firstvirtual machine may comprise one virtual machine out of a plurality ofvirtual machines that are to be cloned in order to run, for example, aset of virtualized production services within a cloned environment. Instep 804, a first snapshot of the first virtual machine is acquired. Thefirst snapshot may correspond with a state of the first virtual machineat a particular point in time. In step 806, a set of dependentapplications that the application depends on for operation isdetermined. In one example, the application may comprise an inventorymanagement application that depends on a database application (e.g., theinventory management application may use the database application inorder to access or store inventory-related information). In this case,the inventory management application may run on the first virtualmachine and the database application may run on a different virtualmachine that is in communication with the first virtual machine.

In step 808, an ordering of the set of dependent applications isdetermined such that every application that a particular application ofthe set of dependent applications depends on precedes the particularapplication in the ordering. In one example, the application may dependon a second application, which in turn depends on a third application.In this case, the ordering may comprise the third application followedby the second application followed by the application. The dependenciesbetween each application of the set of dependent applications may bedetermined using a dependency mapping table or using a direct acyclicgraph (DAG) in which vertices of the DAG correspond with theapplications of the set of dependent applications and directed edgesbetween the vertices may correspond with the dependencies. In oneexample, a directed edge from a predecessor node to a successor node mayrepresent that the successor node depends on the predecessor node.

In step 810, a set of virtual machines that run the set of dependentapplications is determined. The set of virtual machines maycorrespondence with virtual machines running the set of dependentapplications at the particular point in time. In step 812, a set ofsnapshots of the set of virtual machines is acquired. The set ofsnapshots may correspond with states of the set of virtual machines atthe particular point in time. In some cases, the set of virtual machinesmay be paused or quiesced while the set of snapshots are captured.

In step 814, a second set of virtual machines is brought up using theset of snapshots. Each virtual machine of the second set of virtualmachines is brought up in an order that satisfies the ordering of theset of dependent applications. The second set of virtual machines maycomprise cloned versions of the set of virtual machines that run the setof dependent applications. In step 816, a second virtual machine isbrought up using the first snapshot of the first virtual machinesubsequent to bringing up the second set of virtual machines. The secondvirtual machine may comprise a cloned version of the first virtualmachine. In some embodiments, where the cloned versions of the firstvirtual machine and the set of virtual machines must be configured withthe same IP addresses as the first virtual machine and the set ofvirtual machines, the cloned versions may be brought up in a privatenetwork and a gateway virtual machine may be configured to act as agateway between the cloned versions within the private network andoutside networks.

FIG. 9 is a flowchart describing one embodiment of a process foroperating a cluster-based file server that does not require a front-endload balancer. In one embodiment, the process of FIG. 9 may be performedby a storage appliance, such as storage appliance 170 in FIG. 1A.

In step 902, a first floating IP address is assigned to a first node ina cluster. The first node may respond to requests made to the firstfloating IP address. The cluster may comprise a plurality of physicalmachines. Each physical machine of the plurality of physical machinesmay correspond with a node in the cluster. The cluster may comprise acluster-based network file server. In one embodiment, a hypervisor incommunication with the cluster may be configured with the first floatingIP address. In some cases, the hypervisor may not provide a failovermechanism nor be able to update or reconfigure the first floating IPaddress after the hypervisor has been configured with the first floatingIP address.

In step 904, a second floating IP address is assigned to a second nodein the cluster. The first floating IP address is different from thesecond floating IP address. The second node may respond to requests madeto the second floating IP address. In step 906, it is detected that thefirst node has failed. In one example, the first node may becomenonresponsive to communications over the network due to a hardwarefailure or a network failure. In one embodiment, a cluster managementsystem may periodically monitor the availability of nodes within thecluster and flag a node failure when a particular node within thecluster goes down or becomes nonresponsive after a threshold period oftime (e.g., a node has been nonresponsive for more than thirty secondsor two minutes). In step 908, a set of nodes within the cluster that areresponsive is determined. The set of nodes may comprise the nodes withinthe cluster that are responsive or announcing themselves as alive over anetwork connecting the cluster. The set of nodes may be determined inresponse to detecting that the first node has failed.

In step 910, a set of priority values corresponding with the set ofnodes is generated. In one embodiment, given a number (N) of nodes in acluster from node(0) to node(N−1), for a floating IP address (i), thepriority value of node(j) may be assigned (j−i) modulo N. In oneexample, node(j) may assume floating IP address (i) only if its priorityvalue is greater than that of any other node in the cluster that isalive and announcing itself on the network. In another embodiment, givena number (N) of nodes in a cluster from node(0) to node(N−1), for afloating IP address (i), the priority value of node(j) may be (i−j)modulo N. In one example, node(j) may assume floating IP address (i)only if its priority value is less than that of any other node in thecluster that is alive and announcing itself on the network. In step 912,it is determined that the second node is associated with a highestpriority value of the set of priority values. In step 914, the firstfloating IP address is assigned to the second node in response todetermining that the second node is associated with the highest priorityvalue. In one embodiment, after the first floating IP address has beenassigned to the second node, the second node may be responsive to andcommunicate with a hypervisor that is configured to communicate with thecluster using the first floating IP address. In other embodiments, itmay be determined that the second node is associated with a lowestpriority value of the set of priority values and the first floating IPaddress may be assigned to the second node in response to determiningthat the second node is associated with the lowest priority value.

In some embodiments, it may be determined that the second node should beassigned the first floating IP address based on a set of virtualmachines that were running on the first node when the first node failed.Upon detection that the first node has failed, a set of virtual machinesthat were running on the first node when the first node failed may beidentified, a subset of the set of nodes within the cluster that arerunning the set of virtual machines may be identified, and a subset ofthe set of priority values corresponding with the subset of the set ofnodes may be determined. The second node may then be determined based ona highest priority value of the subset of the set of priority values. Inone example, the first node may have been running three virtual machineswhen the first node failed. The subset of the set of nodes may comprisenodes within the cluster that are currently running the three virtualmachines. In some cases, the subset of the set of nodes may comprisenodes within the cluster that are currently running at least two of thethree virtual machines. The subset of the set of priority values maycorrespond with priority values generated for the subset of the set ofnodes. The second node may then be identified as the node within thesubset of the set of nodes with the highest priority value of the subsetof the set of priority values. In another example, if a virtualmachine's data resides on nodes 1, 4, and 6 in a cluster and node 1fails, then nodes 4 and 6 may be given a higher priority and either node4 or node 6 may be assigned the floating IP address associated with node1. Upon detection that the first node is back up, the second node mayrelease the first floating IP address.

The disclosed technology may be described in the context ofcomputer-executable instructions, such as software or program modules,being executed by a computer or processor. The computer-executableinstructions may comprise portions of computer program code, routines,programs, objects, software components, data structures, or other typesof computer-related structures that may be used to perform processesusing a computer. In some cases, hardware or combinations of hardwareand software may be substituted for software or used in place ofsoftware.

Computer program code used for implementing various operations oraspects of the disclosed technology may be developed using one or moreprogramming languages, including an object oriented programming languagesuch as Java or C++, a procedural programming language such as the “C”programming language or Visual Basic, or a dynamic programming languagesuch as Python or JavaScript. In some cases, computer program code ormachine-level instructions derived from the computer program code mayexecute entirely on an end user's computer, partly on an end user'scomputer, partly on an end user's computer and partly on a remotecomputer, or entirely on a remote computer or server.

For purposes of this document, it should be noted that the dimensions ofthe various features depicted in the Figures may not necessarily bedrawn to scale.

For purposes of this document, reference in the specification to “anembodiment,” “one embodiment,” “some embodiments,” or “anotherembodiment” may be used to describe different embodiments and do notnecessarily refer to the same embodiment.

For purposes of this document, a connection may be a direct connectionor an indirect connection (e.g., via another part). In some cases, whenan element is referred to as being connected or coupled to anotherelement, the element may be directly connected to the other element orindirectly connected to the other element via intervening elements. Whenan element is referred to as being directly connected to anotherelement, then there are no intervening elements between the element andthe other element.

For purposes of this document, the term “based on” may be read as “basedat least in part on.”

For purposes of this document, without additional context, use ofnumerical terms such as a “first” object, a “second” object, and a“third” object may not imply an ordering of objects, but may instead beused for identification purposes to identify different objects.

For purposes of this document, the term “set” of objects may refer to a“set” of one or more of the objects.

Although the subject matter has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the subject matter defined in the appended claims is notnecessarily limited to the specific features or acts described above.Rather, the specific features and acts described above are disclosed asexample forms of implementing the claims.

What is claimed is:
 1. A method for operating a data management system,comprising: acquiring a set of files corresponding with a plurality ofversions of a virtual machine; determining a first version of theplurality of versions associated with a base file of the set of files;determining a second version of the plurality of versions associatedwith a new base file to be generated, the first version of the virtualmachine corresponds with a first state of the virtual machine at a firstpoint in time, the second version of the virtual machine correspondswith a second state of the virtual machine at a second point in timesubsequent to the first point in time; generating the new base filecorresponding with the second version of the virtual machine, thegenerating the new base file includes patching the base file with one ormore forward incremental files of the set of files, the one or moreforward incremental files correspond with the second version and one ormore versions of the virtual machine between the first version and thesecond version, the generating the new base file includes concurrentlyreading the base file from a magnetic storage device while reading theone or more forward incremental files from a solid-state storage devicedifferent from the magnetic storage device, the one or more forwardincremental files comprise a plurality of incremental files; generatinga set of reverse incremental files corresponding with the first versionand the one or more versions of the virtual machine between the firstversion and the second version; storing the new base file correspondingwith the second version of the virtual machine using the magneticstorage device, the second version of the virtual machine comprises amore recent version of the virtual machine than the first version of thevirtual machine; storing the set of reverse incremental files using thesolid-state storage device different from the magnetic storage device;acquiring a merged file associated with the second version of thevirtual machine, the merged file includes a first pointer to the newbase file stored using the magnetic storage device and a second set ofpointers to the set of reverse incremental files stored using thesolid-state storage device; and generating the second version of thevirtual machine, the generating the second version of the virtualmachine includes concurrently reading the new base file pointed to bythe first pointer from the magnetic storage device while reading the setof reverse incremental files pointed to by the second set of pointersfrom the solid-state storage device.
 2. The method of claim 1, wherein:the second version of the virtual machine comprises the most recentversion of the virtual machine.
 3. The method of claim 1, furthercomprising: detecting that a number of forward incremental files thatneed to be patched to the base file in order to generate the secondversion is greater than a threshold number of forward incremental files;and performing the generating the new base file and the generating theset of reverse incremental files in response to detecting that thenumber of forward incremental files that need to be patched to generatethe second version is greater than the threshold number of forwardincremental files.
 4. The method of claim 1, wherein: the generating thenew base file includes reading a first file of the set of files from adistributed file system, detecting a data error in the first file usinga checksum comparison, and correcting the data error in the first filein response to detecting the data error.
 5. The method of claim 1,further comprising: updating a set of merged files to reference the newbase file, the set of merged files corresponds with merged files for thefirst version, the second version, and the one or more versions of thevirtual machine between the first version and the second version, theset of merged files includes the merged file.
 6. The method of claim 1,further comprising: acquiring a backup policy associated with thevirtual machine; identifying a second set of reverse incremental filesassociated with versions of the virtual machine that are older than thefirst version based on the backup policy; and transferring the secondset of reverse incremental files from the solid-state storage device tothe magnetic storage device.
 7. The method of claim 1, furthercomprising: acquiring a backup policy associated with the virtualmachine, the backup policy specifies a maximum number of snapshotsallowed for the virtual machine for a particular time period;identifying a second set of reverse incremental files based on thebackup policy; and consolidating the second set of reverse incrementalfiles.
 8. The method of claim 1, wherein: the magnetic storage devicehas a first read speed; and the solid-state storage device has a secondread speed that is faster than the first read speed.
 9. The method ofclaim 1, further comprising: detecting that a rate of change in a numberof forward incremental files for the virtual machine is greater than athreshold; and performing the generating the new base file and thegenerating the set of reverse incremental files in response to detectingthat the rate of change in the number of forward incremental files forthe virtual machine is greater than the threshold.
 10. The method ofclaim 1, further comprising: detecting that there is no dependency onthe set of files; and deleting the set of files in response to detectingthat there is no dependency on the set of files.
 11. The method of claim10, wherein: the detecting that there is no dependency on the set offiles includes detecting that no merged files stored within the datamanagement system include a pointer to any of the set of files.
 12. Adata management system, comprising: a first storage device configured tostore a base file associated with a first version of a virtual machine;a second storage device configured to store one or more forwardincremental files associated with one or more versions of the virtualmachine; and one or more processors in communication with the firststorage device and the second storage device, the one or more processorsconfigured to determine a second version of the one or more versionsassociated with a new base file to be generated, the one or more forwardincremental files correspond with the second version and one or moreversions of the virtual machine between the first version and the secondversion, the one or more forward incremental files comprise a pluralityof incremental files, the one or more processors configured toconcurrently read the base file from the first storage device and theone or more forward incremental files from the second storage device andconfigured to generate the new base file corresponding with the secondversion of the virtual machine using the base file and the one or moreforward incremental files, the one or more processors configured togenerate a set of reverse incremental files corresponding with the firstversion and the one or more versions of the virtual machine between thefirst version and the second version and configured to cause the newbase file to be stored using the first storage device and the set ofreverse incremental files to be stored using the second storage device,the one or more processors configured to acquire a merged fileassociated with the second version of the virtual machine, the mergedfile includes a first pointer to the new base file stored using thefirst storage device and a second set of pointers to the set of reverseincremental files stored using the second storage device, the one ormore processors configured to concurrently read the new base filepointed to by the first pointer from the first storage device and theset of reverse incremental files pointed to by the second set ofpointers from the second storage device and configured to generate thesecond version of the virtual machine using the new base file and theset of reverse incremental files.
 13. The data management system ofclaim 12, wherein: the first version of the virtual machine correspondswith a first state of the virtual machine at a first point in time; thesecond version of the virtual machine corresponds with a second state ofthe virtual machine at a second point in time subsequent to the firstpoint in time; the first storage device comprises a magnetic storagedevice; and the second storage device comprises a solid-state storagedevice.
 14. The data management system of claim 12, wherein: the one ormore processors configured to detect that a threshold period of time haspassed since the base file was generated and generate the new base filein response to detection that the threshold period of time has passedsince the base file was generated.
 15. The data management system ofclaim 12, wherein: the one or more processors configured to detect thata number of forward incremental files that need to be patched to thebase file in order to generate the second version is greater than athreshold number of forward incremental files, the one or moreprocessors configured to generate the new base file and generate the setof reverse incremental files in response to detection that the number offorward incremental files that need to be patched to generate the secondversion is greater than the threshold number of forward incrementalfiles.
 16. The data management system of claim 12, wherein: the one ormore processors configured to acquire a backup policy associated withthe virtual machine and identify a second set of reverse incrementalfiles associated with versions of the virtual machine that are olderthan the first version based on the backup policy, the one or moreprocessors configured to transfer the second set of reverse incrementalfiles from the second storage device to the first storage device. 17.The data management system of claim 12, wherein: the one or moreprocessors configured to acquire a backup policy associated with thevirtual machine, the backup policy specifies a maximum number ofsnapshots allowed for the virtual machine for a particular time period,the one or more processors configured to identify a second set ofreverse incremental files based on the backup policy and consolidate thesecond set of reverse incremental files.
 18. One or more non-transitorystorage devices containing processor readable code for programming oneor more processors to perform a method for operating a data managementsystem, the processor readable code comprising: processor readable codeconfigured to determine a first version of a virtual machine, the firstversion is associated with a base file; processor readable codeconfigured to determine a second version of the virtual machineassociated with a new base file to be generated, the first version ofthe virtual machine corresponds with a first state of the virtualmachine at a first point in time, the second version of the virtualmachine corresponds with a second state of the virtual machine at asecond point in time subsequent to the first point in time; processorreadable code configured to concurrently read the base file from a firststorage device of a first type while reading one or more forwardincremental files from a second storage device of a second typedifferent from the first storage device and generate the new base filecorresponding with the second version using the base file and the one ormore forward incremental files, the one or more forward incrementalfiles correspond with the second version and one or more versions of thevirtual machine between the first version and the second version, theone or more forward incremental files comprise a plurality ofincremental files; processor readable code configured to generate a setof reverse incremental files corresponding with the first version andthe one or more versions of the virtual machine between the firstversion and the second version; processor readable code configured tostore the new base file corresponding with the second version of thevirtual machine using the first storage device; processor readable codeconfigured to store the set of reverse incremental files using thesecond storage device different from the first storage device; processorreadable code configured to acquire a merged file associated with thesecond version of the virtual machine, the merged file includes a firstpointer to the new base file stored using the first storage device and asecond set of pointers to the set of reverse incremental files storedusing the second storage device; and processor readable code configuredto concurrently read the new base file pointed to by the first pointerfrom the first storage device while reading the set of reverseincremental files pointed to by the second set of pointers from thesecond storage device and generate the second version of the virtualmachine using the new base file and the set of reverse incrementalfiles.
 19. The one or more non-transitory storage devices of claim 18,wherein the processor readable code further comprises: processorreadable code configured to detect that a number of forward incrementalfiles that need to be patched to the base file in order to generate thesecond version is greater than a threshold number of forward incrementalfiles; and processor readable code configured to generate the new basefile and the set of reverse incremental files in response to detectingthat the number of forward incremental files that need to be patched togenerate the second version is greater than the threshold number offorward incremental files.
 20. The one or more non-transitory storagedevices of claim 18, wherein: the second version of the virtual machinecomprises a more recent version of the virtual machine than the firstversion of the virtual machine; the first storage device comprises amagnetic storage device; and the second storage device comprises asolid-state storage device.